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

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: Fix Win and CrOS build. 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
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..4b5a63b9d2322e36bb5d77a8ef0ffe4eee013d96 100644
--- a/chrome/browser/api/prefs/pref_member.h
+++ b/chrome/browser/api/prefs/pref_member.h
@@ -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);
Mattias Nissler (ping if slow) 2012/12/04 10:10:34 So this wasn't used previously? ;) Any reason to
Jói 2012/12/04 10:55:57 It's a performance optimization; we already create
Mattias Nissler (ping if slow) 2012/12/04 11:18:33 Is the difference measurable? I usually prefer les
Jói 2012/12/04 11:42:26 The performance difference is probably not measura
Mattias Nissler (ping if slow) 2012/12/04 15:24:37 I don't feel too strong, feel free to keep as is.
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|,

Powered by Google App Engine
This is Rietveld 408576698