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

Side by Side Diff: chrome/browser/ui/prefs/prefs_tab_helper.h

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_
6 #define CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ 6 #define CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/prefs/pref_change_registrar.h" 9 #include "base/prefs/pref_change_registrar.h"
10 #include "content/public/browser/notification_observer.h" 10 #include "content/public/browser/notification_observer.h"
(...skipping 12 matching lines...) Expand all
23 class PrefRegistrySyncable; 23 class PrefRegistrySyncable;
24 } 24 }
25 25
26 // Per-tab class to handle user preferences. 26 // Per-tab class to handle user preferences.
27 class PrefsTabHelper : public content::NotificationObserver, 27 class PrefsTabHelper : public content::NotificationObserver,
28 public content::WebContentsUserData<PrefsTabHelper> { 28 public content::WebContentsUserData<PrefsTabHelper> {
29 public: 29 public:
30 virtual ~PrefsTabHelper(); 30 virtual ~PrefsTabHelper();
31 31
32 static void InitIncognitoUserPrefStore(OverlayUserPrefStore* pref_store); 32 static void InitIncognitoUserPrefStore(OverlayUserPrefStore* pref_store);
33 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); 33 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
34 static void MigrateUserPrefs(PrefService* prefs); 34 static void MigrateUserPrefs(PrefService* prefs);
35 35
36 protected: 36 protected:
37 // Update the RenderView's WebPreferences. Exposed as protected for testing. 37 // Update the RenderView's WebPreferences. Exposed as protected for testing.
38 virtual void UpdateWebPreferences(); 38 virtual void UpdateWebPreferences();
39 39
40 private: 40 private:
41 explicit PrefsTabHelper(content::WebContents* contents); 41 explicit PrefsTabHelper(content::WebContents* contents);
42 friend class content::WebContentsUserData<PrefsTabHelper>; 42 friend class content::WebContentsUserData<PrefsTabHelper>;
43 43
44 // content::NotificationObserver overrides: 44 // content::NotificationObserver overrides:
45 virtual void Observe(int type, 45 virtual void Observe(int type,
46 const content::NotificationSource& source, 46 const content::NotificationSource& source,
47 const content::NotificationDetails& details) OVERRIDE; 47 const content::NotificationDetails& details) OVERRIDE;
48 48
49 // Update the WebContents's RendererPreferences. 49 // Update the WebContents's RendererPreferences.
50 void UpdateRendererPreferences(); 50 void UpdateRendererPreferences();
51 51
52 Profile* GetProfile(); 52 Profile* GetProfile();
53 void OnWebPrefChanged(const std::string& pref_name); 53 void OnWebPrefChanged(const std::string& pref_name);
54 54
55 content::WebContents* web_contents_; 55 content::WebContents* web_contents_;
56 content::NotificationRegistrar registrar_; 56 content::NotificationRegistrar registrar_;
57 PrefChangeRegistrar pref_change_registrar_; 57 PrefChangeRegistrar pref_change_registrar_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(PrefsTabHelper); 59 DISALLOW_COPY_AND_ASSIGN(PrefsTabHelper);
60 }; 60 };
61 61
62 #endif // CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ 62 #endif // CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/network_profile_bubble.cc ('k') | chrome/browser/ui/prefs/prefs_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698