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

Unified Diff: chrome/browser/content_settings/cookie_settings.h

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit Created 8 years, 1 month 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/content_settings/cookie_settings.h
diff --git a/chrome/browser/content_settings/cookie_settings.h b/chrome/browser/content_settings/cookie_settings.h
index f1aba030bea005dea63fcab7043db04fce8e6881..853f1df369c7ad7daa98e62151a3096711b9a451 100644
--- a/chrome/browser/content_settings/cookie_settings.h
+++ b/chrome/browser/content_settings/cookie_settings.h
@@ -11,12 +11,12 @@
#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
#include "base/prefs/public/pref_change_registrar.h"
+#include "base/prefs/public/pref_observer.h"
#include "base/synchronization/lock.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/profiles/refcounted_profile_keyed_service.h"
#include "chrome/browser/profiles/refcounted_profile_keyed_service_factory.h"
#include "chrome/common/content_settings.h"
-#include "content/public/browser/notification_observer.h"
class ContentSettingsPattern;
class CookieSettingsWrapper;
@@ -29,7 +29,7 @@ class Profile;
// thread and read on any thread. One instance per profile.
class CookieSettings
- : public content::NotificationObserver,
+ : public PrefObserver,
public RefcountedProfileKeyedService {
public:
CookieSettings(
@@ -91,10 +91,9 @@ class CookieSettings
void ResetCookieSetting(const ContentSettingsPattern& primary_pattern,
const ContentSettingsPattern& secondary_pattern);
- // |NotificationObserver| implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ // |PrefObserver| implementation.
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
// Detaches the |CookieSettings| from all |Profile|-related objects like
// |PrefService|. This methods needs to be called before destroying the

Powered by Google App Engine
This is Rietveld 408576698