OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/prefs/pref_service.h" | 5 #include "chrome/browser/prefs/pref_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 | 900 |
901 // Every registered preference has at least a default value. | 901 // Every registered preference has at least a default value. |
902 NOTREACHED() << "no valid value found for registered pref " << name_; | 902 NOTREACHED() << "no valid value found for registered pref " << name_; |
903 return NULL; | 903 return NULL; |
904 } | 904 } |
905 | 905 |
906 bool PrefService::Preference::IsManaged() const { | 906 bool PrefService::Preference::IsManaged() const { |
907 return pref_value_store()->PrefValueInManagedStore(name_.c_str()); | 907 return pref_value_store()->PrefValueInManagedStore(name_.c_str()); |
908 } | 908 } |
909 | 909 |
| 910 bool PrefService::Preference::IsRecommended() const { |
| 911 return pref_value_store()->PrefValueFromRecommendedStore(name_.c_str()); |
| 912 } |
| 913 |
910 bool PrefService::Preference::HasExtensionSetting() const { | 914 bool PrefService::Preference::HasExtensionSetting() const { |
911 return pref_value_store()->PrefValueInExtensionStore(name_.c_str()); | 915 return pref_value_store()->PrefValueInExtensionStore(name_.c_str()); |
912 } | 916 } |
913 | 917 |
914 bool PrefService::Preference::HasUserSetting() const { | 918 bool PrefService::Preference::HasUserSetting() const { |
915 return pref_value_store()->PrefValueInUserStore(name_.c_str()); | 919 return pref_value_store()->PrefValueInUserStore(name_.c_str()); |
916 } | 920 } |
917 | 921 |
918 bool PrefService::Preference::IsExtensionControlled() const { | 922 bool PrefService::Preference::IsExtensionControlled() const { |
919 return pref_value_store()->PrefValueFromExtensionStore(name_.c_str()); | 923 return pref_value_store()->PrefValueFromExtensionStore(name_.c_str()); |
920 } | 924 } |
921 | 925 |
922 bool PrefService::Preference::IsUserControlled() const { | 926 bool PrefService::Preference::IsUserControlled() const { |
923 return pref_value_store()->PrefValueFromUserStore(name_.c_str()); | 927 return pref_value_store()->PrefValueFromUserStore(name_.c_str()); |
924 } | 928 } |
925 | 929 |
926 bool PrefService::Preference::IsDefaultValue() const { | 930 bool PrefService::Preference::IsDefaultValue() const { |
927 return pref_value_store()->PrefValueFromDefaultStore(name_.c_str()); | 931 return pref_value_store()->PrefValueFromDefaultStore(name_.c_str()); |
928 } | 932 } |
929 | 933 |
930 bool PrefService::Preference::IsUserModifiable() const { | 934 bool PrefService::Preference::IsUserModifiable() const { |
931 return pref_value_store()->PrefValueUserModifiable(name_.c_str()); | 935 return pref_value_store()->PrefValueUserModifiable(name_.c_str()); |
932 } | 936 } |
933 | 937 |
934 bool PrefService::Preference::IsExtensionModifiable() const { | 938 bool PrefService::Preference::IsExtensionModifiable() const { |
935 return pref_value_store()->PrefValueExtensionModifiable(name_.c_str()); | 939 return pref_value_store()->PrefValueExtensionModifiable(name_.c_str()); |
936 } | 940 } |
OLD | NEW |