| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 (*s_whitelist)[::prefs::kAcceptLanguages] = | 328 (*s_whitelist)[::prefs::kAcceptLanguages] = |
| 329 settings_private::PrefType::PREF_TYPE_STRING; | 329 settings_private::PrefType::PREF_TYPE_STRING; |
| 330 | 330 |
| 331 // System settings. | 331 // System settings. |
| 332 (*s_whitelist)[::prefs::kBackgroundModeEnabled] = | 332 (*s_whitelist)[::prefs::kBackgroundModeEnabled] = |
| 333 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 333 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 334 (*s_whitelist)[::prefs::kHardwareAccelerationModeEnabled] = | 334 (*s_whitelist)[::prefs::kHardwareAccelerationModeEnabled] = |
| 335 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 335 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 336 | 336 |
| 337 // Import data | 337 // Import data |
| 338 (*s_whitelist)[::prefs::kImportAutofillFormData] = | 338 (*s_whitelist)[::prefs::kImportDialogAutofillFormData] = |
| 339 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 339 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 340 (*s_whitelist)[::prefs::kImportBookmarks] = | 340 (*s_whitelist)[::prefs::kImportDialogBookmarks] = |
| 341 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 341 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 342 (*s_whitelist)[::prefs::kImportHistory] = | 342 (*s_whitelist)[::prefs::kImportDialogHistory] = |
| 343 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 343 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 344 (*s_whitelist)[::prefs::kImportSavedPasswords] = | 344 (*s_whitelist)[::prefs::kImportDialogSavedPasswords] = |
| 345 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 345 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 346 (*s_whitelist)[::prefs::kImportSearchEngine] = | 346 (*s_whitelist)[::prefs::kImportDialogSearchEngine] = |
| 347 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 347 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 348 #endif | 348 #endif |
| 349 | 349 |
| 350 // Search settings. | 350 // Search settings. |
| 351 (*s_whitelist)[::prefs::kHotwordSearchEnabled] = | 351 (*s_whitelist)[::prefs::kHotwordSearchEnabled] = |
| 352 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 352 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 353 (*s_whitelist)[::prefs::kHotwordAlwaysOnSearchEnabled] = | 353 (*s_whitelist)[::prefs::kHotwordAlwaysOnSearchEnabled] = |
| 354 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 354 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 355 | 355 |
| 356 // Proxy settings. | 356 // Proxy settings. |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 ExtensionPrefValueMapFactory::GetForBrowserContext(profile_) | 744 ExtensionPrefValueMapFactory::GetForBrowserContext(profile_) |
| 745 ->GetExtensionControllingPref(pref_object.key); | 745 ->GetExtensionControllingPref(pref_object.key); |
| 746 if (extension_id.empty()) | 746 if (extension_id.empty()) |
| 747 return nullptr; | 747 return nullptr; |
| 748 | 748 |
| 749 return ExtensionRegistry::Get(profile_)->GetExtensionById( | 749 return ExtensionRegistry::Get(profile_)->GetExtensionById( |
| 750 extension_id, ExtensionRegistry::ENABLED); | 750 extension_id, ExtensionRegistry::ENABLED); |
| 751 } | 751 } |
| 752 | 752 |
| 753 } // namespace extensions | 753 } // namespace extensions |
| OLD | NEW |