OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |