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

Unified Diff: chrome/browser/api/prefs/pref_member.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 | « base/prefs/public/pref_service_base.h ('k') | chrome/browser/api/prefs/pref_member.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/api/prefs/pref_member.h
diff --git a/chrome/browser/api/prefs/pref_member.h b/chrome/browser/api/prefs/pref_member.h
index 18a2129fc98946e8286355369cac0d1c951a5536..78436936149008c0f37080326aecc12312c8556c 100644
--- a/chrome/browser/api/prefs/pref_member.h
+++ b/chrome/browser/api/prefs/pref_member.h
@@ -32,14 +32,14 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop_proxy.h"
+#include "base/prefs/public/pref_observer.h"
#include "base/values.h"
-#include "content/public/browser/notification_observer.h"
class PrefServiceBase;
namespace subtle {
-class PrefMemberBase : public content::NotificationObserver {
+class PrefMemberBase : public PrefObserver {
protected:
class Internal : public base::RefCountedThreadSafe<Internal> {
public:
@@ -91,7 +91,7 @@ class PrefMemberBase : public content::NotificationObserver {
// See PrefMember<> for description.
void Init(const char* pref_name, PrefServiceBase* prefs,
- content::NotificationObserver* observer);
+ PrefObserver* observer);
virtual void CreateInternal() const = 0;
@@ -100,10 +100,9 @@ class PrefMemberBase : public content::NotificationObserver {
void MoveToThread(const scoped_refptr<base::MessageLoopProxy>& message_loop);
- // content::NotificationObserver
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ // PrefObserver
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
void VerifyValuePrefName() const {
DCHECK(!pref_name_.empty());
@@ -127,7 +126,7 @@ class PrefMemberBase : public content::NotificationObserver {
private:
// Ordered the members to compact the class instance.
std::string pref_name_;
- content::NotificationObserver* observer_;
+ PrefObserver* observer_;
PrefServiceBase* prefs_;
protected:
@@ -153,7 +152,7 @@ class PrefMember : public subtle::PrefMemberBase {
// don't want any notifications of changes.
// This method should only be called on the UI thread.
void Init(const char* pref_name, PrefServiceBase* prefs,
- content::NotificationObserver* observer) {
+ PrefObserver* observer) {
subtle::PrefMemberBase::Init(pref_name, prefs, observer);
}
« no previous file with comments | « base/prefs/public/pref_service_base.h ('k') | chrome/browser/api/prefs/pref_member.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698