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

Unified Diff: chrome/browser/profiles/profile_impl.h

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years, 2 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/profiles/profile_impl.h
diff --git a/chrome/browser/profiles/profile_impl.h b/chrome/browser/profiles/profile_impl.h
index 1c6506ad11539e1ff7c5685e6ec88a13100f1883..b3b514cd5dd9f77c21425ac3e4b4985f53963deb 100644
--- a/chrome/browser/profiles/profile_impl.h
+++ b/chrome/browser/profiles/profile_impl.h
@@ -22,6 +22,7 @@
class NetPrefObserver;
class PrefService;
+class PrefServiceBase;
class PromoResourceService;
class SSLConfigServiceManager;
@@ -43,7 +44,8 @@ class ExtensionSystem;
// The default profile implementation.
class ProfileImpl : public Profile,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public PrefObserver {
public:
// Value written to prefs when the exit type is EXIT_NORMAL. Public for tests.
static const char* const kPrefExitTypeNormal;
@@ -126,6 +128,12 @@ class ProfileImpl : public Profile,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // PrefObserver implementation.
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
+
+ // PrefInitObserver implementation.
+
private:
friend class Profile;
FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest,
@@ -147,6 +155,9 @@ class ProfileImpl : public Profile,
void InitHostZoomMap();
+ void OnInitializationCompleted(PrefServiceBase* pref_service,
+ bool succeeded);
+
// Does final prefs initialization and calls Init().
void OnPrefsLoaded(bool success);

Powered by Google App Engine
This is Rietveld 408576698