| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/extensions/api/settings_private/prefs_util.h" | 5 #include "chrome/browser/extensions/api/settings_private/prefs_util.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/extensions/chrome_extension_function.h" | 9 #include "chrome/browser/extensions/chrome_extension_function.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 if (s_whitelist) | 60 if (s_whitelist) |
| 61 return *s_whitelist; | 61 return *s_whitelist; |
| 62 // TODO(dbeam): why aren't we using kPrefName from pref_names.h? | 62 // TODO(dbeam): why aren't we using kPrefName from pref_names.h? |
| 63 s_whitelist = new PrefsUtil::TypedPrefMap(); | 63 s_whitelist = new PrefsUtil::TypedPrefMap(); |
| 64 (*s_whitelist)["alternate_error_pages.enabled"] = | 64 (*s_whitelist)["alternate_error_pages.enabled"] = |
| 65 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 65 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 66 (*s_whitelist)["autofill.enabled"] = | 66 (*s_whitelist)["autofill.enabled"] = |
| 67 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 67 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 68 (*s_whitelist)["bookmark_bar.show_on_all_tabs"] = | 68 (*s_whitelist)["bookmark_bar.show_on_all_tabs"] = |
| 69 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 69 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 70 (*s_whitelist)["browser.custom_chrome_frame"] = |
| 71 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 70 (*s_whitelist)["browser.show_home_button"] = | 72 (*s_whitelist)["browser.show_home_button"] = |
| 71 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 73 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 72 | 74 |
| 73 // Appearance settings. | 75 // Appearance settings. |
| 74 (*s_whitelist)["extensions.theme.id"] = | 76 (*s_whitelist)["extensions.theme.id"] = |
| 75 settings_private::PrefType::PREF_TYPE_STRING; | 77 settings_private::PrefType::PREF_TYPE_STRING; |
| 76 (*s_whitelist)["webkit.webprefs.default_fixed_font_size"] = | 78 (*s_whitelist)["webkit.webprefs.default_fixed_font_size"] = |
| 77 settings_private::PrefType::PREF_TYPE_NUMBER; | 79 settings_private::PrefType::PREF_TYPE_NUMBER; |
| 78 (*s_whitelist)["webkit.webprefs.default_font_size"] = | 80 (*s_whitelist)["webkit.webprefs.default_font_size"] = |
| 79 settings_private::PrefType::PREF_TYPE_NUMBER; | 81 settings_private::PrefType::PREF_TYPE_NUMBER; |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 | 641 |
| 640 bool PrefsUtil::IsCrosSetting(const std::string& pref_name) { | 642 bool PrefsUtil::IsCrosSetting(const std::string& pref_name) { |
| 641 #if defined(OS_CHROMEOS) | 643 #if defined(OS_CHROMEOS) |
| 642 return CrosSettings::Get()->IsCrosSettings(pref_name); | 644 return CrosSettings::Get()->IsCrosSettings(pref_name); |
| 643 #else | 645 #else |
| 644 return false; | 646 return false; |
| 645 #endif | 647 #endif |
| 646 } | 648 } |
| 647 | 649 |
| 648 } // namespace extensions | 650 } // namespace extensions |
| OLD | NEW |