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

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: 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 7389d37def64d5bf2dc3f89210df7124f747f3fe..efb05ad93043a1d8bd26e7df8d02347978076abb 100644
--- a/chrome/browser/profiles/profile_impl.h
+++ b/chrome/browser/profiles/profile_impl.h
@@ -14,6 +14,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/prefs/public/pref_change_registrar.h"
+#include "base/prefs/public/pref_init_observer.h"
#include "base/timer.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_impl_io_data.h"
@@ -22,6 +23,7 @@
class NetPrefObserver;
class PrefService;
+class PrefServiceBase;
class PromoResourceService;
class SSLConfigServiceManager;
@@ -43,7 +45,9 @@ class ExtensionSystem;
// The default profile implementation.
class ProfileImpl : public Profile,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public PrefObserver,
+ public PrefInitObserver {
public:
// Value written to prefs when the exit type is EXIT_NORMAL. Public for tests.
static const char* const kPrefExitTypeNormal;
@@ -127,6 +131,14 @@ 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.
+ virtual void OnInitializationCompleted(PrefServiceBase* pref_service,
+ bool succeeded) OVERRIDE;
+
private:
friend class Profile;
FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest,

Powered by Google App Engine
This is Rietveld 408576698