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