Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3941)

Unified Diff: chrome/browser/ui/prefs/prefs_tab_helper.h

Issue 878363002: Watch the preferences for changes per profile instead of per tab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/prefs/prefs_tab_helper.h
diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.h b/chrome/browser/ui/prefs/prefs_tab_helper.h
index 60c98e4d6d61f247daa2c6b2a51399cefff0099e..493ad0381eaa7c620201f3f8e6c70fe27423b86c 100644
--- a/chrome/browser/ui/prefs/prefs_tab_helper.h
+++ b/chrome/browser/ui/prefs/prefs_tab_helper.h
@@ -8,7 +8,6 @@
#include "base/callback_list.h"
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
-#include "base/prefs/pref_change_registrar.h"
#include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -34,6 +33,7 @@ class PrefsTabHelper : public content::NotificationObserver,
static void InitIncognitoUserPrefStore(OverlayUserPrefStore* pref_store);
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
+ static void GetServiceInstance();
protected:
// Update the RenderView's WebPreferences. Exposed as protected for testing.
@@ -42,6 +42,7 @@ class PrefsTabHelper : public content::NotificationObserver,
private:
explicit PrefsTabHelper(content::WebContents* contents);
friend class content::WebContentsUserData<PrefsTabHelper>;
+ friend class PrefWatcher;
Bernhard Bauer 2015/01/28 23:35:52 Can we move PrefWatcher into this class? Then we w
// content::NotificationObserver overrides:
void Observe(int type,
@@ -51,14 +52,12 @@ class PrefsTabHelper : public content::NotificationObserver,
// Update the WebContents's RendererPreferences.
void UpdateRendererPreferences();
- Profile* GetProfile();
-
void OnFontFamilyPrefChanged(const std::string& pref_name);
void OnWebPrefChanged(const std::string& pref_name);
content::WebContents* web_contents_;
+ Profile* profile_;
content::NotificationRegistrar registrar_;
- PrefChangeRegistrar pref_change_registrar_;
scoped_ptr<base::CallbackList<void(void)>::Subscription>
style_sheet_subscription_;
scoped_ptr<chrome::ChromeZoomLevelPrefs::DefaultZoomLevelSubscription>

Powered by Google App Engine
This is Rietveld 408576698