| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 (*s_whitelist)[browsing_data::prefs::kDeleteFormData] = | 182 (*s_whitelist)[browsing_data::prefs::kDeleteFormData] = |
| 183 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 183 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 184 (*s_whitelist)[browsing_data::prefs::kDeleteHostedAppsData] = | 184 (*s_whitelist)[browsing_data::prefs::kDeleteHostedAppsData] = |
| 185 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 185 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 186 (*s_whitelist)[browsing_data::prefs::kDeleteMediaLicenses] = | 186 (*s_whitelist)[browsing_data::prefs::kDeleteMediaLicenses] = |
| 187 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 187 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 188 (*s_whitelist)[browsing_data::prefs::kDeleteTimePeriod] = | 188 (*s_whitelist)[browsing_data::prefs::kDeleteTimePeriod] = |
| 189 settings_private::PrefType::PREF_TYPE_NUMBER; | 189 settings_private::PrefType::PREF_TYPE_NUMBER; |
| 190 | 190 |
| 191 #if defined(OS_CHROMEOS) | 191 #if defined(OS_CHROMEOS) |
| 192 // Accounts / Users / People. |
| 192 (*s_whitelist)[chromeos::kAccountsPrefAllowGuest] = | 193 (*s_whitelist)[chromeos::kAccountsPrefAllowGuest] = |
| 193 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 194 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 194 (*s_whitelist)[chromeos::kAccountsPrefSupervisedUsersEnabled] = | 195 (*s_whitelist)[chromeos::kAccountsPrefSupervisedUsersEnabled] = |
| 195 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 196 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 196 (*s_whitelist)[chromeos::kAccountsPrefShowUserNamesOnSignIn] = | 197 (*s_whitelist)[chromeos::kAccountsPrefShowUserNamesOnSignIn] = |
| 197 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 198 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 198 (*s_whitelist)[chromeos::kAccountsPrefAllowNewUser] = | 199 (*s_whitelist)[chromeos::kAccountsPrefAllowNewUser] = |
| 199 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 200 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 200 (*s_whitelist)[chromeos::kAccountsPrefUsers] = | 201 (*s_whitelist)[chromeos::kAccountsPrefUsers] = |
| 201 settings_private::PrefType::PREF_TYPE_LIST; | 202 settings_private::PrefType::PREF_TYPE_LIST; |
| 203 (*s_whitelist)[::prefs::kEnableAutoScreenLock] = |
| 204 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 205 |
| 206 // Accessibility. |
| 202 (*s_whitelist)[::prefs::kAccessibilitySpokenFeedbackEnabled] = | 207 (*s_whitelist)[::prefs::kAccessibilitySpokenFeedbackEnabled] = |
| 203 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 208 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 204 (*s_whitelist)[::prefs::kAccessibilityAutoclickEnabled] = | 209 (*s_whitelist)[::prefs::kAccessibilityAutoclickEnabled] = |
| 205 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 210 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 206 (*s_whitelist)[::prefs::kAccessibilityAutoclickDelayMs] = | 211 (*s_whitelist)[::prefs::kAccessibilityAutoclickDelayMs] = |
| 207 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 212 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 208 (*s_whitelist)[::prefs::kAccessibilityCaretHighlightEnabled] = | 213 (*s_whitelist)[::prefs::kAccessibilityCaretHighlightEnabled] = |
| 209 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 214 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 210 (*s_whitelist)[::prefs::kAccessibilityCursorHighlightEnabled] = | 215 (*s_whitelist)[::prefs::kAccessibilityCursorHighlightEnabled] = |
| 211 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 216 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 222 (*s_whitelist)[::prefs::kAccessibilitySelectToSpeakEnabled] = | 227 (*s_whitelist)[::prefs::kAccessibilitySelectToSpeakEnabled] = |
| 223 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 228 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 224 (*s_whitelist)[::prefs::kAccessibilityStickyKeysEnabled] = | 229 (*s_whitelist)[::prefs::kAccessibilityStickyKeysEnabled] = |
| 225 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 230 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 226 (*s_whitelist)[::prefs::kAccessibilitySwitchAccessEnabled] = | 231 (*s_whitelist)[::prefs::kAccessibilitySwitchAccessEnabled] = |
| 227 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 232 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 228 (*s_whitelist)[::prefs::kAccessibilityVirtualKeyboardEnabled] = | 233 (*s_whitelist)[::prefs::kAccessibilityVirtualKeyboardEnabled] = |
| 229 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 234 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 230 (*s_whitelist)[::prefs::kAccessibilityMonoAudioEnabled] = | 235 (*s_whitelist)[::prefs::kAccessibilityMonoAudioEnabled] = |
| 231 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 236 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 237 |
| 238 // Misc. |
| 232 (*s_whitelist)[::prefs::kUse24HourClock] = | 239 (*s_whitelist)[::prefs::kUse24HourClock] = |
| 233 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 240 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 234 (*s_whitelist)[::prefs::kLanguagePreferredLanguages] = | 241 (*s_whitelist)[::prefs::kLanguagePreferredLanguages] = |
| 235 settings_private::PrefType::PREF_TYPE_STRING; | 242 settings_private::PrefType::PREF_TYPE_STRING; |
| 236 (*s_whitelist)[::prefs::kTapDraggingEnabled] = | 243 (*s_whitelist)[::prefs::kTapDraggingEnabled] = |
| 237 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 244 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 238 (*s_whitelist)[chromeos::kStatsReportingPref] = | 245 (*s_whitelist)[chromeos::kStatsReportingPref] = |
| 239 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 246 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 247 (*s_whitelist)[chromeos::kAttestationForContentProtectionEnabled] = |
| 248 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 249 |
| 250 // Bluetooth & Internet settings. |
| 240 (*s_whitelist)[chromeos::kAllowBluetooth] = | 251 (*s_whitelist)[chromeos::kAllowBluetooth] = |
| 241 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 252 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 242 (*s_whitelist)[chromeos::kAttestationForContentProtectionEnabled] = | 253 (*s_whitelist)[proxy_config::prefs::kUseSharedProxies] = |
| 243 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 254 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 244 (*s_whitelist)[::prefs::kWakeOnWifiDarkConnect] = | 255 (*s_whitelist)[::prefs::kWakeOnWifiDarkConnect] = |
| 245 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 256 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 246 (*s_whitelist)[::prefs::kEnableAutoScreenLock] = | |
| 247 settings_private::PrefType::PREF_TYPE_BOOLEAN; | |
| 248 | 257 |
| 249 // Timezone settings. | 258 // Timezone settings. |
| 250 (*s_whitelist)[chromeos::kSystemTimezone] = | 259 (*s_whitelist)[chromeos::kSystemTimezone] = |
| 251 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 260 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 252 (*s_whitelist)[::prefs::kResolveTimezoneByGeolocation] = | 261 (*s_whitelist)[::prefs::kResolveTimezoneByGeolocation] = |
| 253 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 262 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| 254 | 263 |
| 255 // Ash settings. | 264 // Ash settings. |
| 256 (*s_whitelist)[::prefs::kEnableStylusTools] = | 265 (*s_whitelist)[::prefs::kEnableStylusTools] = |
| 257 settings_private::PrefType::PREF_TYPE_BOOLEAN; | 266 settings_private::PrefType::PREF_TYPE_BOOLEAN; |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 if (pref_object.key == ::prefs::kURLsToRestoreOnStartup) | 701 if (pref_object.key == ::prefs::kURLsToRestoreOnStartup) |
| 693 return GetExtensionOverridingStartupPages(profile_); | 702 return GetExtensionOverridingStartupPages(profile_); |
| 694 if (pref_object.key == ::prefs::kDefaultSearchProviderEnabled) | 703 if (pref_object.key == ::prefs::kDefaultSearchProviderEnabled) |
| 695 return GetExtensionOverridingSearchEngine(profile_); | 704 return GetExtensionOverridingSearchEngine(profile_); |
| 696 if (pref_object.key == proxy_config::prefs::kProxy) | 705 if (pref_object.key == proxy_config::prefs::kProxy) |
| 697 return GetExtensionOverridingProxy(profile_); | 706 return GetExtensionOverridingProxy(profile_); |
| 698 return nullptr; | 707 return nullptr; |
| 699 } | 708 } |
| 700 | 709 |
| 701 } // namespace extensions | 710 } // namespace extensions |
| OLD | NEW |