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/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 "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
17 #include "base/stl_util-inl.h" | 17 #include "base/stl_util-inl.h" |
18 #include "base/string_number_conversions.h" | 18 #include "base/string_number_conversions.h" |
19 #include "base/string_util.h" | 19 #include "base/string_util.h" |
20 #include "base/sys_string_conversions.h" | 20 #include "base/sys_string_conversions.h" |
21 #include "base/utf_string_conversions.h" | 21 #include "base/utf_string_conversions.h" |
22 #include "build/build_config.h" | 22 #include "build/build_config.h" |
23 #include "chrome/browser/browser_thread.h" | 23 #include "chrome/browser/browser_thread.h" |
24 #include "chrome/browser/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
25 #include "chrome/common/notification_service.h" | 25 #include "chrome/common/notification_service.h" |
26 #include "grit/chromium_strings.h" | 26 #include "grit/chromium_strings.h" |
27 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 // A helper function for RegisterLocalized*Pref that creates a Value* based on | 31 // A helper function for RegisterLocalized*Pref that creates a Value* based on |
32 // the string value in the locale dll. Because we control the values in a | 32 // the string value in the locale dll. Because we control the values in a |
33 // locale dll, this should always return a Value of the appropriate type. | 33 // locale dll, this should always return a Value of the appropriate type. |
34 Value* CreateLocaleDefaultValue(Value::ValueType type, int message_id) { | 34 Value* CreateLocaleDefaultValue(Value::ValueType type, int message_id) { |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 | 630 |
631 bool PrefService::Preference::IsDefaultValue() const { | 631 bool PrefService::Preference::IsDefaultValue() const { |
632 return pref_service_->pref_value_store_-> | 632 return pref_service_->pref_value_store_-> |
633 PrefValueFromDefaultStore(name_.c_str()); | 633 PrefValueFromDefaultStore(name_.c_str()); |
634 } | 634 } |
635 | 635 |
636 bool PrefService::Preference::IsUserModifiable() const { | 636 bool PrefService::Preference::IsUserModifiable() const { |
637 return pref_service_->pref_value_store_-> | 637 return pref_service_->pref_value_store_-> |
638 PrefValueUserModifiable(name_.c_str()); | 638 PrefValueUserModifiable(name_.c_str()); |
639 } | 639 } |
OLD | NEW |