| 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/extensions/settings_api_helpers.h" | 10 #include "chrome/browser/extensions/settings_api_helpers.h" |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 (*s_whitelist)[::prefs::kImportBookmarks] = | 322 (*s_whitelist)[::prefs::kImportBookmarks] = |
| 323 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 323 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 324 (*s_whitelist)[::prefs::kImportHistory] = | 324 (*s_whitelist)[::prefs::kImportHistory] = |
| 325 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 325 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 326 (*s_whitelist)[::prefs::kImportSavedPasswords] = | 326 (*s_whitelist)[::prefs::kImportSavedPasswords] = |
| 327 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 327 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 328 (*s_whitelist)[::prefs::kImportSearchEngine] = | 328 (*s_whitelist)[::prefs::kImportSearchEngine] = |
| 329 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 329 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 330 #endif | 330 #endif |
| 331 | 331 |
| 332 // Search settings. |
| 333 (*s_whitelist)[::prefs::kHotwordSearchEnabled] = |
| 334 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 335 (*s_whitelist)[::prefs::kHotwordAlwaysOnSearchEnabled] = |
| 336 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 337 |
| 332 // Proxy settings. | 338 // Proxy settings. |
| 333 (*s_whitelist)[proxy_config::prefs::kProxy] = | 339 (*s_whitelist)[proxy_config::prefs::kProxy] = |
| 334 settings_private::PrefType::PREF_TYPE_DICTIONARY; | 340 settings_private::PrefType::PREF_TYPE_DICTIONARY; |
| 335 | 341 |
| 336 #if defined(GOOGLE_CHROME_BUILD) | 342 #if defined(GOOGLE_CHROME_BUILD) |
| 337 (*s_whitelist)[::prefs::kMediaRouterEnableCloudServices] = | 343 (*s_whitelist)[::prefs::kMediaRouterEnableCloudServices] = |
| 338 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 344 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 339 #endif // defined(GOOGLE_CHROME_BUILD) | 345 #endif // defined(GOOGLE_CHROME_BUILD) |
| 340 | 346 |
| 341 return *s_whitelist; | 347 return *s_whitelist; |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 if (pref_object.key == ::prefs::kDefaultSearchProviderEnabled) | 717 if (pref_object.key == ::prefs::kDefaultSearchProviderEnabled) |
| 712 return GetExtensionOverridingSearchEngine(profile_); | 718 return GetExtensionOverridingSearchEngine(profile_); |
| 713 | 719 |
| 714 if (pref_object.key == proxy_config::prefs::kProxy) | 720 if (pref_object.key == proxy_config::prefs::kProxy) |
| 715 return GetExtensionOverridingProxy(profile_); | 721 return GetExtensionOverridingProxy(profile_); |
| 716 | 722 |
| 717 return nullptr; | 723 return nullptr; |
| 718 } | 724 } |
| 719 | 725 |
| 720 } // namespace extensions | 726 } // namespace extensions |
| OLD | NEW |