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

Side by Side Diff: chrome/browser/pref_service.cc

Issue 2989002: Add methods for determining which PrefStore contains a given preference, and ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 5 months 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 | « chrome/browser/pref_service.h ('k') | chrome/browser/pref_value_store.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 "chrome/browser/pref_service.h" 5 #include "chrome/browser/pref_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 // Pref not found, just return the app default. 830 // Pref not found, just return the app default.
831 return default_value_.get(); 831 return default_value_.get();
832 } 832 }
833 833
834 bool PrefService::Preference::IsDefaultValue() const { 834 bool PrefService::Preference::IsDefaultValue() const {
835 DCHECK(default_value_.get()); 835 DCHECK(default_value_.get());
836 return default_value_->Equals(GetValue()); 836 return default_value_->Equals(GetValue());
837 } 837 }
838 838
839 bool PrefService::Preference::IsManaged() const { 839 bool PrefService::Preference::IsManaged() const {
840 return pref_value_store_->PrefValueIsManaged(name_.c_str()); 840 return pref_value_store_->PrefValueInManagedStore(name_.c_str());
841 } 841 }
842 842
843 bool PrefService::Preference::HasExtensionSetting() const {
844 return pref_value_store_->PrefValueInExtensionStore(name_.c_str());
845 }
846
847 bool PrefService::Preference::HasUserSetting() const {
848 return pref_value_store_->PrefValueInUserStore(name_.c_str());
849 }
850
851 bool PrefService::Preference::IsExtensionControlled() const {
852 return pref_value_store_->PrefValueFromExtensionStore(name_.c_str());
853 }
854
855 bool PrefService::Preference::IsUserControlled() const {
856 return pref_value_store_->PrefValueFromUserStore(name_.c_str());
857 }
OLDNEW
« no previous file with comments | « chrome/browser/pref_service.h ('k') | chrome/browser/pref_value_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698