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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service.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/safe_browsing/safe_browsing_service.h
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h
index d650ae1f14a0d79ae242946ce4c66279a8816c52..bf29fb45727f7e5dd63dc1f164a87f5e847bfde8 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -20,6 +20,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
+#include "base/prefs/public/pref_observer.h"
#include "base/sequenced_task_runner_helpers.h"
#include "base/synchronization/lock.h"
#include "base/time.h"
@@ -55,7 +56,8 @@ class DownloadProtectionService;
class SafeBrowsingService
: public base::RefCountedThreadSafe<
SafeBrowsingService, content::BrowserThread::DeleteOnUIThread>,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public PrefObserver {
public:
class Client;
// Passed a boolean indicating whether or not it is OK to proceed with
@@ -470,6 +472,10 @@ class SafeBrowsingService
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // PrefObserver override
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
+
// Starts following the safe browsing preference on |pref_service|.
void AddPrefService(PrefService* pref_service);
« no previous file with comments | « chrome/browser/protector/protected_prefs_watcher.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698