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

Side by Side Diff: base/prefs/pref_value_store.cc

Issue 822713002: Update from https://crrev.com/309415 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/pref_value_store.h" 5 #include "base/prefs/pref_value_store.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/prefs/pref_notifier.h" 8 #include "base/prefs/pref_notifier.h"
9 #include "base/prefs/pref_observer.h" 9 #include "base/prefs/pref_observer.h"
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // effective value of the pref will not have changed. 131 // effective value of the pref will not have changed.
132 pref_notifier_->OnPreferenceChanged(path); 132 pref_notifier_->OnPreferenceChanged(path);
133 if (!pref_changed_callback_.is_null()) 133 if (!pref_changed_callback_.is_null())
134 pref_changed_callback_.Run(path); 134 pref_changed_callback_.Run(path);
135 } 135 }
136 136
137 bool PrefValueStore::PrefValueInManagedStore(const std::string& name) const { 137 bool PrefValueStore::PrefValueInManagedStore(const std::string& name) const {
138 return PrefValueInStore(name, MANAGED_STORE); 138 return PrefValueInStore(name, MANAGED_STORE);
139 } 139 }
140 140
141 bool PrefValueStore::PrefValueInSupervisedStore(const std::string& name) const {
142 return PrefValueInStore(name, SUPERVISED_USER_STORE);
143 }
144
141 bool PrefValueStore::PrefValueInExtensionStore(const std::string& name) const { 145 bool PrefValueStore::PrefValueInExtensionStore(const std::string& name) const {
142 return PrefValueInStore(name, EXTENSION_STORE); 146 return PrefValueInStore(name, EXTENSION_STORE);
143 } 147 }
144 148
145 bool PrefValueStore::PrefValueInUserStore(const std::string& name) const { 149 bool PrefValueStore::PrefValueInUserStore(const std::string& name) const {
146 return PrefValueInStore(name, USER_STORE); 150 return PrefValueInStore(name, USER_STORE);
147 } 151 }
148 152
149 bool PrefValueStore::PrefValueFromExtensionStore( 153 bool PrefValueStore::PrefValueFromExtensionStore(
150 const std::string& name) const { 154 const std::string& name) const {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 if (initialization_failed_) 279 if (initialization_failed_)
276 return; 280 return;
277 for (size_t i = 0; i <= PREF_STORE_TYPE_MAX; ++i) { 281 for (size_t i = 0; i <= PREF_STORE_TYPE_MAX; ++i) {
278 scoped_refptr<PrefStore> store = 282 scoped_refptr<PrefStore> store =
279 GetPrefStore(static_cast<PrefStoreType>(i)); 283 GetPrefStore(static_cast<PrefStoreType>(i));
280 if (store.get() && !store->IsInitializationComplete()) 284 if (store.get() && !store->IsInitializationComplete())
281 return; 285 return;
282 } 286 }
283 pref_notifier_->OnInitializationCompleted(true); 287 pref_notifier_->OnInitializationCompleted(true);
284 } 288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698