chromium/chrome/browser/ui/prefs/pref_watcher.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "chrome/browser/ui/prefs/pref_watcher.h"

#include "base/functional/bind.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/privacy_sandbox/tracking_protection_settings_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_preferences_util.h"
#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
#include "chrome/common/pref_names.h"
#include "components/language/core/browser/pref_names.h"
#include "components/live_caption/pref_names.h"
#include "components/privacy_sandbox/tracking_protection_settings.h"
#include "third_party/blink/public/common/renderer_preferences/renderer_preferences.h"
#include "ui/native_theme/native_theme.h"

#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/constants/ash_pref_names.h"
#endif

#if BUILDFLAG(IS_ANDROID)
#include "components/browser_ui/accessibility/android/font_size_prefs_android.h"
#endif

namespace {

// The list of prefs we want to observe.
const char* const kWebPrefsToObserve[] =;

const int kWebPrefsToObserveLength =;

}  // namespace

// Watching all these settings per tab is slow when a user has a lot of tabs and
// and they use session restore. So watch them once per profile.
// http://crbug.com/452693
PrefWatcher::PrefWatcher(Profile* profile)
    :{}

PrefWatcher::~PrefWatcher() = default;

void PrefWatcher::RegisterHelper(PrefsTabHelper* helper) {}

void PrefWatcher::UnregisterHelper(PrefsTabHelper* helper) {}

void PrefWatcher::RegisterRendererPreferenceWatcher(
    mojo::PendingRemote<blink::mojom::RendererPreferenceWatcher> watcher) {}

void PrefWatcher::Shutdown() {}

void PrefWatcher::OnNativeThemeUpdated(
    ui::NativeTheme* observed_theme) {}

void PrefWatcher::OnDoNotTrackEnabledChanged() {}

void PrefWatcher::UpdateRendererPreferences() {}

void PrefWatcher::OnWebPrefChanged(const std::string& pref_name) {}

// static
PrefWatcher* PrefWatcherFactory::GetForProfile(Profile* profile) {}

// static
PrefWatcherFactory* PrefWatcherFactory::GetInstance() {}

PrefWatcherFactory::PrefWatcherFactory()
    :{}

PrefWatcherFactory::~PrefWatcherFactory() = default;

std::unique_ptr<KeyedService>
PrefWatcherFactory::BuildServiceInstanceForBrowserContext(
    content::BrowserContext* browser_context) const {}

// static
PrefWatcher* PrefWatcher::Get(Profile* profile) {}