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

Unified Diff: chrome/browser/api/prefs/pref_member.h

Issue 11316163: Remove the last usages of PrefObserver outside of Prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years 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_change_registrar_unittest.cc ('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 1441320893210e203966032657a96ca01be1b49a..495ea067f20991c1980c6df271a97e0f59620efa 100644
--- a/chrome/browser/api/prefs/pref_member.h
+++ b/chrome/browser/api/prefs/pref_member.h
@@ -8,7 +8,7 @@
// class MyClass {
// public:
// MyClass(PrefService* prefs) {
-// my_string_.Init(prefs::kHomePage, prefs, NULL /* no observer */);
+// my_string_.Init(prefs::kHomePage, prefs);
// }
// private:
// StringPrefMember my_string_;
@@ -103,6 +103,7 @@ class PrefMemberBase : public PrefObserver {
// See PrefMember<> for description.
void Init(const char* pref_name, PrefServiceBase* prefs,
const NamedChangeCallback& observer);
+ void Init(const char* pref_name, PrefServiceBase* prefs);
virtual void CreateInternal() const = 0;
@@ -178,17 +179,6 @@ class PrefMember : public subtle::PrefMemberBase {
subtle::PrefMemberBase::Init(pref_name, prefs);
}
- // Deprecated version of Init.
- void Init(const char* pref_name, PrefServiceBase* prefs,
- PrefObserver* observer) {
- if (observer) {
- Init(pref_name, prefs, base::Bind(&PrefObserver::OnPreferenceChanged,
- base::Unretained(observer), prefs));
- } else {
- Init(pref_name, prefs, NamedChangeCallback());
- }
- }
-
// Unsubscribes the PrefMember from the PrefService. After calling this
// function, the PrefMember may not be used any more on the UI thread.
// Assuming |MoveToThread| was previously called, |GetValue|, |IsManaged|,
« no previous file with comments | « base/prefs/public/pref_change_registrar_unittest.cc ('k') | chrome/browser/api/prefs/pref_member.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698