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

Side by Side Diff: base/prefs/public/pref_change_registrar.cc

Issue 11293249: Remove PrefObserver usage, batch 3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/prefs/public/pref_change_registrar.h ('k') | chrome/browser/api/prefs/pref_member.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/prefs/public/pref_change_registrar.h" 5 #include "base/prefs/public/pref_change_registrar.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/prefs/public/pref_service_base.h" 9 #include "base/prefs/public/pref_service_base.h"
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 void PrefChangeRegistrar::OnPreferenceChanged(PrefServiceBase* service, 84 void PrefChangeRegistrar::OnPreferenceChanged(PrefServiceBase* service,
85 const std::string& pref) { 85 const std::string& pref) {
86 if (IsObserved(pref)) 86 if (IsObserved(pref))
87 observers_[pref].Run(pref); 87 observers_[pref].Run(pref);
88 } 88 }
89 89
90 void PrefChangeRegistrar::InvokeUnnamedCallback(const base::Closure& callback, 90 void PrefChangeRegistrar::InvokeUnnamedCallback(const base::Closure& callback,
91 const std::string& pref_name) { 91 const std::string& pref_name) {
92 callback.Run(); 92 callback.Run();
93 } 93 }
94
95 PrefServiceBase* PrefChangeRegistrar::prefs() {
96 return service_;
97 }
OLDNEW
« no previous file with comments | « base/prefs/public/pref_change_registrar.h ('k') | chrome/browser/api/prefs/pref_member.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698