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

Unified Diff: chrome/browser/policy/url_blacklist_manager.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
« no previous file with comments | « chrome/browser/policy/cloud_policy_subsystem.cc ('k') | chrome/browser/policy/url_blacklist_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/url_blacklist_manager.h
diff --git a/chrome/browser/policy/url_blacklist_manager.h b/chrome/browser/policy/url_blacklist_manager.h
index 8582b9f99ceaf85c078448175ea572e403ce793b..9bbf47c565e1465201ec86ca83380fcd3b37df1c 100644
--- a/chrome/browser/policy/url_blacklist_manager.h
+++ b/chrome/browser/policy/url_blacklist_manager.h
@@ -15,8 +15,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/prefs/public/pref_change_registrar.h"
+#include "base/prefs/public/pref_observer.h"
#include "chrome/common/extensions/matcher/url_matcher.h"
-#include "content/public/browser/notification_observer.h"
class GURL;
class PrefService;
@@ -113,7 +113,7 @@ class URLBlacklist {
// exists in UI, then a potential destruction on IO will come after any task
// posted to IO from that method on UI. This is used to go through IO before
// the actual update starts, and grab a WeakPtr.
-class URLBlacklistManager : public content::NotificationObserver {
+class URLBlacklistManager : public PrefObserver {
public:
// Must be constructed on the UI thread.
explicit URLBlacklistManager(PrefService* pref_service);
@@ -148,9 +148,8 @@ class URLBlacklistManager : public content::NotificationObserver {
scoped_ptr<base::ListValue> allow);
private:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
// ---------
// UI thread
« no previous file with comments | « chrome/browser/policy/cloud_policy_subsystem.cc ('k') | chrome/browser/policy/url_blacklist_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698