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 "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/extensions/chrome_extension_function.h" | 10 #include "chrome/browser/extensions/chrome_extension_function.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 return *s_whitelist; | 61 return *s_whitelist; |
62 s_whitelist = new PrefsUtil::TypedPrefMap(); | 62 s_whitelist = new PrefsUtil::TypedPrefMap(); |
63 (*s_whitelist)["alternate_error_pages.enabled"] = | 63 (*s_whitelist)["alternate_error_pages.enabled"] = |
64 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 64 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
65 (*s_whitelist)["autofill.enabled"] = | 65 (*s_whitelist)["autofill.enabled"] = |
66 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 66 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
67 (*s_whitelist)["bookmark_bar.show_on_all_tabs"] = | 67 (*s_whitelist)["bookmark_bar.show_on_all_tabs"] = |
68 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 68 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
69 (*s_whitelist)["browser.show_home_button"] = | 69 (*s_whitelist)["browser.show_home_button"] = |
70 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 70 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 71 |
| 72 // Downloads settings. |
71 (*s_whitelist)["download.default_directory"] = | 73 (*s_whitelist)["download.default_directory"] = |
72 settings_private::PrefType::PREF_TYPE_STRING; | 74 settings_private::PrefType::PREF_TYPE_STRING; |
73 (*s_whitelist)["download.prompt_for_download"] = | 75 (*s_whitelist)["download.prompt_for_download"] = |
74 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 76 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 77 (*s_whitelist)["gdata.disabled"] = |
| 78 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 79 |
75 (*s_whitelist)["enable_do_not_track"] = | 80 (*s_whitelist)["enable_do_not_track"] = |
76 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 81 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
77 (*s_whitelist)["homepage"] = settings_private::PrefType::PREF_TYPE_URL; | 82 (*s_whitelist)["homepage"] = settings_private::PrefType::PREF_TYPE_URL; |
78 (*s_whitelist)["homepage_is_newtabpage"] = | 83 (*s_whitelist)["homepage_is_newtabpage"] = |
79 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 84 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
80 (*s_whitelist)["intl.app_locale"] = | 85 (*s_whitelist)["intl.app_locale"] = |
81 settings_private::PrefType::PREF_TYPE_STRING; | 86 settings_private::PrefType::PREF_TYPE_STRING; |
82 (*s_whitelist)["net.network_prediction_options"] = | 87 (*s_whitelist)["net.network_prediction_options"] = |
83 settings_private::PrefType::PREF_TYPE_NUMBER; | 88 settings_private::PrefType::PREF_TYPE_NUMBER; |
84 (*s_whitelist)["profile.password_manager_enabled"] = | 89 (*s_whitelist)["profile.password_manager_enabled"] = |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 | 564 |
560 bool PrefsUtil::IsCrosSetting(const std::string& pref_name) { | 565 bool PrefsUtil::IsCrosSetting(const std::string& pref_name) { |
561 #if defined(OS_CHROMEOS) | 566 #if defined(OS_CHROMEOS) |
562 return CrosSettings::Get()->IsCrosSettings(pref_name); | 567 return CrosSettings::Get()->IsCrosSettings(pref_name); |
563 #else | 568 #else |
564 return false; | 569 return false; |
565 #endif | 570 #endif |
566 } | 571 } |
567 | 572 |
568 } // namespace extensions | 573 } // namespace extensions |
OLD | NEW |