| 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 13 matching lines...) Expand all Loading... |
| 24 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 24 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
| 25 #include "chrome/browser/prefs/command_line_pref_store.h" | 25 #include "chrome/browser/prefs/command_line_pref_store.h" |
| 26 #include "chrome/browser/prefs/default_pref_store.h" | 26 #include "chrome/browser/prefs/default_pref_store.h" |
| 27 #include "chrome/browser/prefs/incognito_user_pref_store.h" | 27 #include "chrome/browser/prefs/incognito_user_pref_store.h" |
| 28 #include "chrome/browser/prefs/pref_model_associator.h" | 28 #include "chrome/browser/prefs/pref_model_associator.h" |
| 29 #include "chrome/browser/prefs/pref_notifier_impl.h" | 29 #include "chrome/browser/prefs/pref_notifier_impl.h" |
| 30 #include "chrome/browser/prefs/pref_value_store.h" | 30 #include "chrome/browser/prefs/pref_value_store.h" |
| 31 #include "chrome/browser/ui/profile_error_dialog.h" | 31 #include "chrome/browser/ui/profile_error_dialog.h" |
| 32 #include "chrome/common/json_pref_store.h" | 32 #include "chrome/common/json_pref_store.h" |
| 33 #include "content/browser/browser_thread.h" | 33 #include "content/browser/browser_thread.h" |
| 34 #include "content/common/notification_service.h" | |
| 35 #include "grit/chromium_strings.h" | 34 #include "grit/chromium_strings.h" |
| 36 #include "grit/generated_resources.h" | 35 #include "grit/generated_resources.h" |
| 37 #include "ui/base/l10n/l10n_util.h" | 36 #include "ui/base/l10n/l10n_util.h" |
| 38 | 37 |
| 39 namespace { | 38 namespace { |
| 40 | 39 |
| 41 // A helper function for RegisterLocalized*Pref that creates a Value* based on | 40 // A helper function for RegisterLocalized*Pref that creates a Value* based on |
| 42 // the string value in the locale dll. Because we control the values in a | 41 // the string value in the locale dll. Because we control the values in a |
| 43 // locale dll, this should always return a Value of the appropriate type. | 42 // locale dll, this should always return a Value of the appropriate type. |
| 44 Value* CreateLocaleDefaultValue(base::Value::Type type, int message_id) { | 43 Value* CreateLocaleDefaultValue(base::Value::Type type, int message_id) { |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 return pref_value_store()->PrefValueFromDefaultStore(name_.c_str()); | 895 return pref_value_store()->PrefValueFromDefaultStore(name_.c_str()); |
| 897 } | 896 } |
| 898 | 897 |
| 899 bool PrefService::Preference::IsUserModifiable() const { | 898 bool PrefService::Preference::IsUserModifiable() const { |
| 900 return pref_value_store()->PrefValueUserModifiable(name_.c_str()); | 899 return pref_value_store()->PrefValueUserModifiable(name_.c_str()); |
| 901 } | 900 } |
| 902 | 901 |
| 903 bool PrefService::Preference::IsExtensionModifiable() const { | 902 bool PrefService::Preference::IsExtensionModifiable() const { |
| 904 return pref_value_store()->PrefValueExtensionModifiable(name_.c_str()); | 903 return pref_value_store()->PrefValueExtensionModifiable(name_.c_str()); |
| 905 } | 904 } |
| OLD | NEW |