| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/policy/configuration_policy_handler_list_factory.h" | 5 #include "chrome/browser/policy/configuration_policy_handler_list_factory.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/extensions/policy_handlers.h" | 10 #include "chrome/browser/extensions/policy_handlers.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 namespace policy { | 49 namespace policy { |
| 50 | 50 |
| 51 namespace { | 51 namespace { |
| 52 | 52 |
| 53 // List of policy types to preference names. This is used for simple policies | 53 // List of policy types to preference names. This is used for simple policies |
| 54 // that directly map to a single preference. | 54 // that directly map to a single preference. |
| 55 const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { | 55 const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { |
| 56 { key::kHomepageLocation, | 56 { key::kHomepageLocation, |
| 57 prefs::kHomePage, | 57 prefs::kHomePage, |
| 58 Value::TYPE_STRING }, | 58 base::Value::TYPE_STRING }, |
| 59 { key::kHomepageIsNewTabPage, | 59 { key::kHomepageIsNewTabPage, |
| 60 prefs::kHomePageIsNewTabPage, | 60 prefs::kHomePageIsNewTabPage, |
| 61 Value::TYPE_BOOLEAN }, | 61 base::Value::TYPE_BOOLEAN }, |
| 62 { key::kRestoreOnStartupURLs, | 62 { key::kRestoreOnStartupURLs, |
| 63 prefs::kURLsToRestoreOnStartup, | 63 prefs::kURLsToRestoreOnStartup, |
| 64 Value::TYPE_LIST }, | 64 base::Value::TYPE_LIST }, |
| 65 { key::kAlternateErrorPagesEnabled, | 65 { key::kAlternateErrorPagesEnabled, |
| 66 prefs::kAlternateErrorPagesEnabled, | 66 prefs::kAlternateErrorPagesEnabled, |
| 67 Value::TYPE_BOOLEAN }, | 67 base::Value::TYPE_BOOLEAN }, |
| 68 { key::kSearchSuggestEnabled, | 68 { key::kSearchSuggestEnabled, |
| 69 prefs::kSearchSuggestEnabled, | 69 prefs::kSearchSuggestEnabled, |
| 70 Value::TYPE_BOOLEAN }, | 70 base::Value::TYPE_BOOLEAN }, |
| 71 { key::kDnsPrefetchingEnabled, | 71 { key::kDnsPrefetchingEnabled, |
| 72 prefs::kNetworkPredictionEnabled, | 72 prefs::kNetworkPredictionEnabled, |
| 73 Value::TYPE_BOOLEAN }, | 73 base::Value::TYPE_BOOLEAN }, |
| 74 { key::kBuiltInDnsClientEnabled, | 74 { key::kBuiltInDnsClientEnabled, |
| 75 prefs::kBuiltInDnsClientEnabled, | 75 prefs::kBuiltInDnsClientEnabled, |
| 76 Value::TYPE_BOOLEAN }, | 76 base::Value::TYPE_BOOLEAN }, |
| 77 { key::kDisableSpdy, | 77 { key::kDisableSpdy, |
| 78 prefs::kDisableSpdy, | 78 prefs::kDisableSpdy, |
| 79 Value::TYPE_BOOLEAN }, | 79 base::Value::TYPE_BOOLEAN }, |
| 80 { key::kSafeBrowsingEnabled, | 80 { key::kSafeBrowsingEnabled, |
| 81 prefs::kSafeBrowsingEnabled, | 81 prefs::kSafeBrowsingEnabled, |
| 82 Value::TYPE_BOOLEAN }, | 82 base::Value::TYPE_BOOLEAN }, |
| 83 { key::kForceSafeSearch, | 83 { key::kForceSafeSearch, |
| 84 prefs::kForceSafeSearch, | 84 prefs::kForceSafeSearch, |
| 85 Value::TYPE_BOOLEAN }, | 85 base::Value::TYPE_BOOLEAN }, |
| 86 { key::kPasswordManagerEnabled, | 86 { key::kPasswordManagerEnabled, |
| 87 prefs::kPasswordManagerEnabled, | 87 prefs::kPasswordManagerEnabled, |
| 88 Value::TYPE_BOOLEAN }, | 88 base::Value::TYPE_BOOLEAN }, |
| 89 { key::kPasswordManagerAllowShowPasswords, | 89 { key::kPasswordManagerAllowShowPasswords, |
| 90 prefs::kPasswordManagerAllowShowPasswords, | 90 prefs::kPasswordManagerAllowShowPasswords, |
| 91 Value::TYPE_BOOLEAN }, | 91 base::Value::TYPE_BOOLEAN }, |
| 92 { key::kPrintingEnabled, | 92 { key::kPrintingEnabled, |
| 93 prefs::kPrintingEnabled, | 93 prefs::kPrintingEnabled, |
| 94 Value::TYPE_BOOLEAN }, | 94 base::Value::TYPE_BOOLEAN }, |
| 95 { key::kDisablePrintPreview, | 95 { key::kDisablePrintPreview, |
| 96 prefs::kPrintPreviewDisabled, | 96 prefs::kPrintPreviewDisabled, |
| 97 Value::TYPE_BOOLEAN }, | 97 base::Value::TYPE_BOOLEAN }, |
| 98 { key::kMetricsReportingEnabled, | 98 { key::kMetricsReportingEnabled, |
| 99 prefs::kMetricsReportingEnabled, | 99 prefs::kMetricsReportingEnabled, |
| 100 Value::TYPE_BOOLEAN }, | 100 base::Value::TYPE_BOOLEAN }, |
| 101 { key::kApplicationLocaleValue, | 101 { key::kApplicationLocaleValue, |
| 102 prefs::kApplicationLocale, | 102 prefs::kApplicationLocale, |
| 103 Value::TYPE_STRING }, | 103 base::Value::TYPE_STRING }, |
| 104 { key::kDisabledPlugins, | 104 { key::kDisabledPlugins, |
| 105 prefs::kPluginsDisabledPlugins, | 105 prefs::kPluginsDisabledPlugins, |
| 106 Value::TYPE_LIST }, | 106 base::Value::TYPE_LIST }, |
| 107 { key::kDisabledPluginsExceptions, | 107 { key::kDisabledPluginsExceptions, |
| 108 prefs::kPluginsDisabledPluginsExceptions, | 108 prefs::kPluginsDisabledPluginsExceptions, |
| 109 Value::TYPE_LIST }, | 109 base::Value::TYPE_LIST }, |
| 110 { key::kEnabledPlugins, | 110 { key::kEnabledPlugins, |
| 111 prefs::kPluginsEnabledPlugins, | 111 prefs::kPluginsEnabledPlugins, |
| 112 Value::TYPE_LIST }, | 112 base::Value::TYPE_LIST }, |
| 113 { key::kShowHomeButton, | 113 { key::kShowHomeButton, |
| 114 prefs::kShowHomeButton, | 114 prefs::kShowHomeButton, |
| 115 Value::TYPE_BOOLEAN }, | 115 base::Value::TYPE_BOOLEAN }, |
| 116 { key::kSavingBrowserHistoryDisabled, | 116 { key::kSavingBrowserHistoryDisabled, |
| 117 prefs::kSavingBrowserHistoryDisabled, | 117 prefs::kSavingBrowserHistoryDisabled, |
| 118 Value::TYPE_BOOLEAN }, | 118 base::Value::TYPE_BOOLEAN }, |
| 119 { key::kAllowDeletingBrowserHistory, | 119 { key::kAllowDeletingBrowserHistory, |
| 120 prefs::kAllowDeletingBrowserHistory, | 120 prefs::kAllowDeletingBrowserHistory, |
| 121 Value::TYPE_BOOLEAN }, | 121 base::Value::TYPE_BOOLEAN }, |
| 122 { key::kDeveloperToolsDisabled, | 122 { key::kDeveloperToolsDisabled, |
| 123 prefs::kDevToolsDisabled, | 123 prefs::kDevToolsDisabled, |
| 124 Value::TYPE_BOOLEAN }, | 124 base::Value::TYPE_BOOLEAN }, |
| 125 { key::kBlockThirdPartyCookies, | 125 { key::kBlockThirdPartyCookies, |
| 126 prefs::kBlockThirdPartyCookies, | 126 prefs::kBlockThirdPartyCookies, |
| 127 Value::TYPE_BOOLEAN }, | 127 base::Value::TYPE_BOOLEAN }, |
| 128 { key::kDefaultCookiesSetting, | 128 { key::kDefaultCookiesSetting, |
| 129 prefs::kManagedDefaultCookiesSetting, | 129 prefs::kManagedDefaultCookiesSetting, |
| 130 Value::TYPE_INTEGER }, | 130 base::Value::TYPE_INTEGER }, |
| 131 { key::kDefaultImagesSetting, | 131 { key::kDefaultImagesSetting, |
| 132 prefs::kManagedDefaultImagesSetting, | 132 prefs::kManagedDefaultImagesSetting, |
| 133 Value::TYPE_INTEGER }, | 133 base::Value::TYPE_INTEGER }, |
| 134 { key::kDefaultPluginsSetting, | 134 { key::kDefaultPluginsSetting, |
| 135 prefs::kManagedDefaultPluginsSetting, | 135 prefs::kManagedDefaultPluginsSetting, |
| 136 Value::TYPE_INTEGER }, | 136 base::Value::TYPE_INTEGER }, |
| 137 { key::kDefaultPopupsSetting, | 137 { key::kDefaultPopupsSetting, |
| 138 prefs::kManagedDefaultPopupsSetting, | 138 prefs::kManagedDefaultPopupsSetting, |
| 139 Value::TYPE_INTEGER }, | 139 base::Value::TYPE_INTEGER }, |
| 140 { key::kAutoSelectCertificateForUrls, | 140 { key::kAutoSelectCertificateForUrls, |
| 141 prefs::kManagedAutoSelectCertificateForUrls, | 141 prefs::kManagedAutoSelectCertificateForUrls, |
| 142 Value::TYPE_LIST }, | 142 base::Value::TYPE_LIST }, |
| 143 { key::kCookiesAllowedForUrls, | 143 { key::kCookiesAllowedForUrls, |
| 144 prefs::kManagedCookiesAllowedForUrls, | 144 prefs::kManagedCookiesAllowedForUrls, |
| 145 Value::TYPE_LIST }, | 145 base::Value::TYPE_LIST }, |
| 146 { key::kCookiesBlockedForUrls, | 146 { key::kCookiesBlockedForUrls, |
| 147 prefs::kManagedCookiesBlockedForUrls, | 147 prefs::kManagedCookiesBlockedForUrls, |
| 148 Value::TYPE_LIST }, | 148 base::Value::TYPE_LIST }, |
| 149 { key::kCookiesSessionOnlyForUrls, | 149 { key::kCookiesSessionOnlyForUrls, |
| 150 prefs::kManagedCookiesSessionOnlyForUrls, | 150 prefs::kManagedCookiesSessionOnlyForUrls, |
| 151 Value::TYPE_LIST }, | 151 base::Value::TYPE_LIST }, |
| 152 { key::kImagesAllowedForUrls, | 152 { key::kImagesAllowedForUrls, |
| 153 prefs::kManagedImagesAllowedForUrls, | 153 prefs::kManagedImagesAllowedForUrls, |
| 154 Value::TYPE_LIST }, | 154 base::Value::TYPE_LIST }, |
| 155 { key::kImagesBlockedForUrls, | 155 { key::kImagesBlockedForUrls, |
| 156 prefs::kManagedImagesBlockedForUrls, | 156 prefs::kManagedImagesBlockedForUrls, |
| 157 Value::TYPE_LIST }, | 157 base::Value::TYPE_LIST }, |
| 158 { key::kJavaScriptAllowedForUrls, | 158 { key::kJavaScriptAllowedForUrls, |
| 159 prefs::kManagedJavaScriptAllowedForUrls, | 159 prefs::kManagedJavaScriptAllowedForUrls, |
| 160 Value::TYPE_LIST }, | 160 base::Value::TYPE_LIST }, |
| 161 { key::kJavaScriptBlockedForUrls, | 161 { key::kJavaScriptBlockedForUrls, |
| 162 prefs::kManagedJavaScriptBlockedForUrls, | 162 prefs::kManagedJavaScriptBlockedForUrls, |
| 163 Value::TYPE_LIST }, | 163 base::Value::TYPE_LIST }, |
| 164 { key::kPluginsAllowedForUrls, | 164 { key::kPluginsAllowedForUrls, |
| 165 prefs::kManagedPluginsAllowedForUrls, | 165 prefs::kManagedPluginsAllowedForUrls, |
| 166 Value::TYPE_LIST }, | 166 base::Value::TYPE_LIST }, |
| 167 { key::kPluginsBlockedForUrls, | 167 { key::kPluginsBlockedForUrls, |
| 168 prefs::kManagedPluginsBlockedForUrls, | 168 prefs::kManagedPluginsBlockedForUrls, |
| 169 Value::TYPE_LIST }, | 169 base::Value::TYPE_LIST }, |
| 170 { key::kPopupsAllowedForUrls, | 170 { key::kPopupsAllowedForUrls, |
| 171 prefs::kManagedPopupsAllowedForUrls, | 171 prefs::kManagedPopupsAllowedForUrls, |
| 172 Value::TYPE_LIST }, | 172 base::Value::TYPE_LIST }, |
| 173 { key::kPopupsBlockedForUrls, | 173 { key::kPopupsBlockedForUrls, |
| 174 prefs::kManagedPopupsBlockedForUrls, | 174 prefs::kManagedPopupsBlockedForUrls, |
| 175 Value::TYPE_LIST }, | 175 base::Value::TYPE_LIST }, |
| 176 { key::kNotificationsAllowedForUrls, | 176 { key::kNotificationsAllowedForUrls, |
| 177 prefs::kManagedNotificationsAllowedForUrls, | 177 prefs::kManagedNotificationsAllowedForUrls, |
| 178 Value::TYPE_LIST }, | 178 base::Value::TYPE_LIST }, |
| 179 { key::kNotificationsBlockedForUrls, | 179 { key::kNotificationsBlockedForUrls, |
| 180 prefs::kManagedNotificationsBlockedForUrls, | 180 prefs::kManagedNotificationsBlockedForUrls, |
| 181 Value::TYPE_LIST }, | 181 base::Value::TYPE_LIST }, |
| 182 { key::kDefaultNotificationsSetting, | 182 { key::kDefaultNotificationsSetting, |
| 183 prefs::kManagedDefaultNotificationsSetting, | 183 prefs::kManagedDefaultNotificationsSetting, |
| 184 Value::TYPE_INTEGER }, | 184 base::Value::TYPE_INTEGER }, |
| 185 { key::kDefaultGeolocationSetting, | 185 { key::kDefaultGeolocationSetting, |
| 186 prefs::kManagedDefaultGeolocationSetting, | 186 prefs::kManagedDefaultGeolocationSetting, |
| 187 Value::TYPE_INTEGER }, | 187 base::Value::TYPE_INTEGER }, |
| 188 { key::kSigninAllowed, | 188 { key::kSigninAllowed, |
| 189 prefs::kSigninAllowed, | 189 prefs::kSigninAllowed, |
| 190 Value::TYPE_BOOLEAN }, | 190 base::Value::TYPE_BOOLEAN }, |
| 191 { key::kEnableOriginBoundCerts, | 191 { key::kEnableOriginBoundCerts, |
| 192 prefs::kEnableOriginBoundCerts, | 192 prefs::kEnableOriginBoundCerts, |
| 193 Value::TYPE_BOOLEAN }, | 193 base::Value::TYPE_BOOLEAN }, |
| 194 { key::kDisableSSLRecordSplitting, | 194 { key::kDisableSSLRecordSplitting, |
| 195 prefs::kDisableSSLRecordSplitting, | 195 prefs::kDisableSSLRecordSplitting, |
| 196 Value::TYPE_BOOLEAN }, | 196 base::Value::TYPE_BOOLEAN }, |
| 197 { key::kEnableOnlineRevocationChecks, | 197 { key::kEnableOnlineRevocationChecks, |
| 198 prefs::kCertRevocationCheckingEnabled, | 198 prefs::kCertRevocationCheckingEnabled, |
| 199 Value::TYPE_BOOLEAN }, | 199 base::Value::TYPE_BOOLEAN }, |
| 200 { key::kRequireOnlineRevocationChecksForLocalAnchors, | 200 { key::kRequireOnlineRevocationChecksForLocalAnchors, |
| 201 prefs::kCertRevocationCheckingRequiredLocalAnchors, | 201 prefs::kCertRevocationCheckingRequiredLocalAnchors, |
| 202 Value::TYPE_BOOLEAN }, | 202 base::Value::TYPE_BOOLEAN }, |
| 203 { key::kAuthSchemes, | 203 { key::kAuthSchemes, |
| 204 prefs::kAuthSchemes, | 204 prefs::kAuthSchemes, |
| 205 Value::TYPE_STRING }, | 205 base::Value::TYPE_STRING }, |
| 206 { key::kDisableAuthNegotiateCnameLookup, | 206 { key::kDisableAuthNegotiateCnameLookup, |
| 207 prefs::kDisableAuthNegotiateCnameLookup, | 207 prefs::kDisableAuthNegotiateCnameLookup, |
| 208 Value::TYPE_BOOLEAN }, | 208 base::Value::TYPE_BOOLEAN }, |
| 209 { key::kEnableAuthNegotiatePort, | 209 { key::kEnableAuthNegotiatePort, |
| 210 prefs::kEnableAuthNegotiatePort, | 210 prefs::kEnableAuthNegotiatePort, |
| 211 Value::TYPE_BOOLEAN }, | 211 base::Value::TYPE_BOOLEAN }, |
| 212 { key::kAuthServerWhitelist, | 212 { key::kAuthServerWhitelist, |
| 213 prefs::kAuthServerWhitelist, | 213 prefs::kAuthServerWhitelist, |
| 214 Value::TYPE_STRING }, | 214 base::Value::TYPE_STRING }, |
| 215 { key::kAuthNegotiateDelegateWhitelist, | 215 { key::kAuthNegotiateDelegateWhitelist, |
| 216 prefs::kAuthNegotiateDelegateWhitelist, | 216 prefs::kAuthNegotiateDelegateWhitelist, |
| 217 Value::TYPE_STRING }, | 217 base::Value::TYPE_STRING }, |
| 218 { key::kGSSAPILibraryName, | 218 { key::kGSSAPILibraryName, |
| 219 prefs::kGSSAPILibraryName, | 219 prefs::kGSSAPILibraryName, |
| 220 Value::TYPE_STRING }, | 220 base::Value::TYPE_STRING }, |
| 221 { key::kAllowCrossOriginAuthPrompt, | 221 { key::kAllowCrossOriginAuthPrompt, |
| 222 prefs::kAllowCrossOriginAuthPrompt, | 222 prefs::kAllowCrossOriginAuthPrompt, |
| 223 Value::TYPE_BOOLEAN }, | 223 base::Value::TYPE_BOOLEAN }, |
| 224 { key::kDisable3DAPIs, | 224 { key::kDisable3DAPIs, |
| 225 prefs::kDisable3DAPIs, | 225 prefs::kDisable3DAPIs, |
| 226 Value::TYPE_BOOLEAN }, | 226 base::Value::TYPE_BOOLEAN }, |
| 227 { key::kDisablePluginFinder, | 227 { key::kDisablePluginFinder, |
| 228 prefs::kDisablePluginFinder, | 228 prefs::kDisablePluginFinder, |
| 229 Value::TYPE_BOOLEAN }, | 229 base::Value::TYPE_BOOLEAN }, |
| 230 { key::kDiskCacheSize, | 230 { key::kDiskCacheSize, |
| 231 prefs::kDiskCacheSize, | 231 prefs::kDiskCacheSize, |
| 232 Value::TYPE_INTEGER }, | 232 base::Value::TYPE_INTEGER }, |
| 233 { key::kMediaCacheSize, | 233 { key::kMediaCacheSize, |
| 234 prefs::kMediaCacheSize, | 234 prefs::kMediaCacheSize, |
| 235 Value::TYPE_INTEGER }, | 235 base::Value::TYPE_INTEGER }, |
| 236 { key::kPolicyRefreshRate, | 236 { key::kPolicyRefreshRate, |
| 237 policy_prefs::kUserPolicyRefreshRate, | 237 policy_prefs::kUserPolicyRefreshRate, |
| 238 Value::TYPE_INTEGER }, | 238 base::Value::TYPE_INTEGER }, |
| 239 { key::kDevicePolicyRefreshRate, | 239 { key::kDevicePolicyRefreshRate, |
| 240 prefs::kDevicePolicyRefreshRate, | 240 prefs::kDevicePolicyRefreshRate, |
| 241 Value::TYPE_INTEGER }, | 241 base::Value::TYPE_INTEGER }, |
| 242 { key::kDefaultBrowserSettingEnabled, | 242 { key::kDefaultBrowserSettingEnabled, |
| 243 prefs::kDefaultBrowserSettingEnabled, | 243 prefs::kDefaultBrowserSettingEnabled, |
| 244 Value::TYPE_BOOLEAN }, | 244 base::Value::TYPE_BOOLEAN }, |
| 245 { key::kRemoteAccessHostFirewallTraversal, | 245 { key::kRemoteAccessHostFirewallTraversal, |
| 246 prefs::kRemoteAccessHostFirewallTraversal, | 246 prefs::kRemoteAccessHostFirewallTraversal, |
| 247 Value::TYPE_BOOLEAN }, | 247 base::Value::TYPE_BOOLEAN }, |
| 248 { key::kRemoteAccessHostRequireTwoFactor, | 248 { key::kRemoteAccessHostRequireTwoFactor, |
| 249 prefs::kRemoteAccessHostRequireTwoFactor, | 249 prefs::kRemoteAccessHostRequireTwoFactor, |
| 250 Value::TYPE_BOOLEAN }, | 250 base::Value::TYPE_BOOLEAN }, |
| 251 { key::kRemoteAccessHostDomain, | 251 { key::kRemoteAccessHostDomain, |
| 252 prefs::kRemoteAccessHostDomain, | 252 prefs::kRemoteAccessHostDomain, |
| 253 Value::TYPE_STRING }, | 253 base::Value::TYPE_STRING }, |
| 254 { key::kRemoteAccessHostTalkGadgetPrefix, | 254 { key::kRemoteAccessHostTalkGadgetPrefix, |
| 255 prefs::kRemoteAccessHostTalkGadgetPrefix, | 255 prefs::kRemoteAccessHostTalkGadgetPrefix, |
| 256 Value::TYPE_STRING }, | 256 base::Value::TYPE_STRING }, |
| 257 { key::kRemoteAccessHostRequireCurtain, | 257 { key::kRemoteAccessHostRequireCurtain, |
| 258 prefs::kRemoteAccessHostRequireCurtain, | 258 prefs::kRemoteAccessHostRequireCurtain, |
| 259 Value::TYPE_BOOLEAN }, | 259 base::Value::TYPE_BOOLEAN }, |
| 260 { key::kRemoteAccessHostAllowClientPairing, | 260 { key::kRemoteAccessHostAllowClientPairing, |
| 261 prefs::kRemoteAccessHostAllowClientPairing, | 261 prefs::kRemoteAccessHostAllowClientPairing, |
| 262 Value::TYPE_BOOLEAN }, | 262 base::Value::TYPE_BOOLEAN }, |
| 263 { key::kCloudPrintProxyEnabled, | 263 { key::kCloudPrintProxyEnabled, |
| 264 prefs::kCloudPrintProxyEnabled, | 264 prefs::kCloudPrintProxyEnabled, |
| 265 Value::TYPE_BOOLEAN }, | 265 base::Value::TYPE_BOOLEAN }, |
| 266 { key::kCloudPrintSubmitEnabled, | 266 { key::kCloudPrintSubmitEnabled, |
| 267 prefs::kCloudPrintSubmitEnabled, | 267 prefs::kCloudPrintSubmitEnabled, |
| 268 Value::TYPE_BOOLEAN }, | 268 base::Value::TYPE_BOOLEAN }, |
| 269 { key::kTranslateEnabled, | 269 { key::kTranslateEnabled, |
| 270 prefs::kEnableTranslate, | 270 prefs::kEnableTranslate, |
| 271 Value::TYPE_BOOLEAN }, | 271 base::Value::TYPE_BOOLEAN }, |
| 272 { key::kAllowOutdatedPlugins, | 272 { key::kAllowOutdatedPlugins, |
| 273 prefs::kPluginsAllowOutdated, | 273 prefs::kPluginsAllowOutdated, |
| 274 Value::TYPE_BOOLEAN }, | 274 base::Value::TYPE_BOOLEAN }, |
| 275 { key::kAlwaysAuthorizePlugins, | 275 { key::kAlwaysAuthorizePlugins, |
| 276 prefs::kPluginsAlwaysAuthorize, | 276 prefs::kPluginsAlwaysAuthorize, |
| 277 Value::TYPE_BOOLEAN }, | 277 base::Value::TYPE_BOOLEAN }, |
| 278 { key::kBookmarkBarEnabled, | 278 { key::kBookmarkBarEnabled, |
| 279 prefs::kShowBookmarkBar, | 279 prefs::kShowBookmarkBar, |
| 280 Value::TYPE_BOOLEAN }, | 280 base::Value::TYPE_BOOLEAN }, |
| 281 { key::kEditBookmarksEnabled, | 281 { key::kEditBookmarksEnabled, |
| 282 prefs::kEditBookmarksEnabled, | 282 prefs::kEditBookmarksEnabled, |
| 283 Value::TYPE_BOOLEAN }, | 283 base::Value::TYPE_BOOLEAN }, |
| 284 { key::kAllowFileSelectionDialogs, | 284 { key::kAllowFileSelectionDialogs, |
| 285 prefs::kAllowFileSelectionDialogs, | 285 prefs::kAllowFileSelectionDialogs, |
| 286 Value::TYPE_BOOLEAN }, | 286 base::Value::TYPE_BOOLEAN }, |
| 287 { key::kImportBookmarks, | 287 { key::kImportBookmarks, |
| 288 prefs::kImportBookmarks, | 288 prefs::kImportBookmarks, |
| 289 Value::TYPE_BOOLEAN }, | 289 base::Value::TYPE_BOOLEAN }, |
| 290 { key::kImportHistory, | 290 { key::kImportHistory, |
| 291 prefs::kImportHistory, | 291 prefs::kImportHistory, |
| 292 Value::TYPE_BOOLEAN }, | 292 base::Value::TYPE_BOOLEAN }, |
| 293 { key::kImportHomepage, | 293 { key::kImportHomepage, |
| 294 prefs::kImportHomepage, | 294 prefs::kImportHomepage, |
| 295 Value::TYPE_BOOLEAN }, | 295 base::Value::TYPE_BOOLEAN }, |
| 296 { key::kImportSearchEngine, | 296 { key::kImportSearchEngine, |
| 297 prefs::kImportSearchEngine, | 297 prefs::kImportSearchEngine, |
| 298 Value::TYPE_BOOLEAN }, | 298 base::Value::TYPE_BOOLEAN }, |
| 299 { key::kImportSavedPasswords, | 299 { key::kImportSavedPasswords, |
| 300 prefs::kImportSavedPasswords, | 300 prefs::kImportSavedPasswords, |
| 301 Value::TYPE_BOOLEAN }, | 301 base::Value::TYPE_BOOLEAN }, |
| 302 { key::kMaxConnectionsPerProxy, | 302 { key::kMaxConnectionsPerProxy, |
| 303 prefs::kMaxConnectionsPerProxy, | 303 prefs::kMaxConnectionsPerProxy, |
| 304 Value::TYPE_INTEGER }, | 304 base::Value::TYPE_INTEGER }, |
| 305 { key::kURLWhitelist, | 305 { key::kURLWhitelist, |
| 306 policy_prefs::kUrlWhitelist, | 306 policy_prefs::kUrlWhitelist, |
| 307 Value::TYPE_LIST }, | 307 base::Value::TYPE_LIST }, |
| 308 { key::kEnableMemoryInfo, | 308 { key::kEnableMemoryInfo, |
| 309 prefs::kEnableMemoryInfo, | 309 prefs::kEnableMemoryInfo, |
| 310 Value::TYPE_BOOLEAN }, | 310 base::Value::TYPE_BOOLEAN }, |
| 311 { key::kRestrictSigninToPattern, | 311 { key::kRestrictSigninToPattern, |
| 312 prefs::kGoogleServicesUsernamePattern, | 312 prefs::kGoogleServicesUsernamePattern, |
| 313 Value::TYPE_STRING }, | 313 base::Value::TYPE_STRING }, |
| 314 { key::kDefaultMediaStreamSetting, | 314 { key::kDefaultMediaStreamSetting, |
| 315 prefs::kManagedDefaultMediaStreamSetting, | 315 prefs::kManagedDefaultMediaStreamSetting, |
| 316 Value::TYPE_INTEGER }, | 316 base::Value::TYPE_INTEGER }, |
| 317 { key::kDisableSafeBrowsingProceedAnyway, | 317 { key::kDisableSafeBrowsingProceedAnyway, |
| 318 prefs::kSafeBrowsingProceedAnywayDisabled, | 318 prefs::kSafeBrowsingProceedAnywayDisabled, |
| 319 Value::TYPE_BOOLEAN }, | 319 base::Value::TYPE_BOOLEAN }, |
| 320 { key::kSpellCheckServiceEnabled, | 320 { key::kSpellCheckServiceEnabled, |
| 321 prefs::kSpellCheckUseSpellingService, | 321 prefs::kSpellCheckUseSpellingService, |
| 322 Value::TYPE_BOOLEAN }, | 322 base::Value::TYPE_BOOLEAN }, |
| 323 { key::kDisableScreenshots, | 323 { key::kDisableScreenshots, |
| 324 prefs::kDisableScreenshots, | 324 prefs::kDisableScreenshots, |
| 325 Value::TYPE_BOOLEAN }, | 325 base::Value::TYPE_BOOLEAN }, |
| 326 { key::kAudioCaptureAllowed, | 326 { key::kAudioCaptureAllowed, |
| 327 prefs::kAudioCaptureAllowed, | 327 prefs::kAudioCaptureAllowed, |
| 328 Value::TYPE_BOOLEAN }, | 328 base::Value::TYPE_BOOLEAN }, |
| 329 { key::kVideoCaptureAllowed, | 329 { key::kVideoCaptureAllowed, |
| 330 prefs::kVideoCaptureAllowed, | 330 prefs::kVideoCaptureAllowed, |
| 331 Value::TYPE_BOOLEAN }, | 331 base::Value::TYPE_BOOLEAN }, |
| 332 { key::kAudioCaptureAllowedUrls, | 332 { key::kAudioCaptureAllowedUrls, |
| 333 prefs::kAudioCaptureAllowedUrls, | 333 prefs::kAudioCaptureAllowedUrls, |
| 334 Value::TYPE_LIST }, | 334 base::Value::TYPE_LIST }, |
| 335 { key::kVideoCaptureAllowedUrls, | 335 { key::kVideoCaptureAllowedUrls, |
| 336 prefs::kVideoCaptureAllowedUrls, | 336 prefs::kVideoCaptureAllowedUrls, |
| 337 Value::TYPE_LIST }, | 337 base::Value::TYPE_LIST }, |
| 338 { key::kHideWebStoreIcon, | 338 { key::kHideWebStoreIcon, |
| 339 prefs::kHideWebStoreIcon, | 339 prefs::kHideWebStoreIcon, |
| 340 Value::TYPE_BOOLEAN }, | 340 base::Value::TYPE_BOOLEAN }, |
| 341 { key::kVariationsRestrictParameter, | 341 { key::kVariationsRestrictParameter, |
| 342 prefs::kVariationsRestrictParameter, | 342 prefs::kVariationsRestrictParameter, |
| 343 Value::TYPE_STRING }, | 343 base::Value::TYPE_STRING }, |
| 344 { key::kSupervisedUserCreationEnabled, | 344 { key::kSupervisedUserCreationEnabled, |
| 345 prefs::kManagedUserCreationAllowed, | 345 prefs::kManagedUserCreationAllowed, |
| 346 Value::TYPE_BOOLEAN }, | 346 base::Value::TYPE_BOOLEAN }, |
| 347 { key::kForceEphemeralProfiles, | 347 { key::kForceEphemeralProfiles, |
| 348 prefs::kForceEphemeralProfiles, | 348 prefs::kForceEphemeralProfiles, |
| 349 Value::TYPE_BOOLEAN }, | 349 base::Value::TYPE_BOOLEAN }, |
| 350 | 350 |
| 351 #if !defined(OS_MACOSX) | 351 #if !defined(OS_MACOSX) |
| 352 { key::kFullscreenAllowed, | 352 { key::kFullscreenAllowed, |
| 353 prefs::kFullscreenAllowed, | 353 prefs::kFullscreenAllowed, |
| 354 Value::TYPE_BOOLEAN }, | 354 base::Value::TYPE_BOOLEAN }, |
| 355 { key::kFullscreenAllowed, | 355 { key::kFullscreenAllowed, |
| 356 apps::prefs::kAppFullscreenAllowed, | 356 apps::prefs::kAppFullscreenAllowed, |
| 357 Value::TYPE_BOOLEAN }, | 357 base::Value::TYPE_BOOLEAN }, |
| 358 #endif // !defined(OS_MACOSX) | 358 #endif // !defined(OS_MACOSX) |
| 359 | 359 |
| 360 #if defined(OS_CHROMEOS) | 360 #if defined(OS_CHROMEOS) |
| 361 { key::kChromeOsLockOnIdleSuspend, | 361 { key::kChromeOsLockOnIdleSuspend, |
| 362 prefs::kEnableScreenLock, | 362 prefs::kEnableScreenLock, |
| 363 Value::TYPE_BOOLEAN }, | 363 base::Value::TYPE_BOOLEAN }, |
| 364 { key::kChromeOsReleaseChannel, | 364 { key::kChromeOsReleaseChannel, |
| 365 prefs::kChromeOsReleaseChannel, | 365 prefs::kChromeOsReleaseChannel, |
| 366 Value::TYPE_STRING }, | 366 base::Value::TYPE_STRING }, |
| 367 { key::kDriveDisabled, | 367 { key::kDriveDisabled, |
| 368 prefs::kDisableDrive, | 368 prefs::kDisableDrive, |
| 369 Value::TYPE_BOOLEAN }, | 369 base::Value::TYPE_BOOLEAN }, |
| 370 { key::kDriveDisabledOverCellular, | 370 { key::kDriveDisabledOverCellular, |
| 371 prefs::kDisableDriveOverCellular, | 371 prefs::kDisableDriveOverCellular, |
| 372 Value::TYPE_BOOLEAN }, | 372 base::Value::TYPE_BOOLEAN }, |
| 373 { key::kExternalStorageDisabled, | 373 { key::kExternalStorageDisabled, |
| 374 prefs::kExternalStorageDisabled, | 374 prefs::kExternalStorageDisabled, |
| 375 Value::TYPE_BOOLEAN }, | 375 base::Value::TYPE_BOOLEAN }, |
| 376 { key::kAudioOutputAllowed, | 376 { key::kAudioOutputAllowed, |
| 377 prefs::kAudioOutputAllowed, | 377 prefs::kAudioOutputAllowed, |
| 378 Value::TYPE_BOOLEAN }, | 378 base::Value::TYPE_BOOLEAN }, |
| 379 { key::kShowLogoutButtonInTray, | 379 { key::kShowLogoutButtonInTray, |
| 380 prefs::kShowLogoutButtonInTray, | 380 prefs::kShowLogoutButtonInTray, |
| 381 Value::TYPE_BOOLEAN }, | 381 base::Value::TYPE_BOOLEAN }, |
| 382 { key::kShelfAutoHideBehavior, | 382 { key::kShelfAutoHideBehavior, |
| 383 prefs::kShelfAutoHideBehaviorLocal, | 383 prefs::kShelfAutoHideBehaviorLocal, |
| 384 Value::TYPE_STRING }, | 384 base::Value::TYPE_STRING }, |
| 385 { key::kSessionLengthLimit, | 385 { key::kSessionLengthLimit, |
| 386 prefs::kSessionLengthLimit, | 386 prefs::kSessionLengthLimit, |
| 387 Value::TYPE_INTEGER }, | 387 base::Value::TYPE_INTEGER }, |
| 388 { key::kWaitForInitialUserActivity, | 388 { key::kWaitForInitialUserActivity, |
| 389 prefs::kSessionWaitForInitialUserActivity, | 389 prefs::kSessionWaitForInitialUserActivity, |
| 390 Value::TYPE_BOOLEAN }, | 390 base::Value::TYPE_BOOLEAN }, |
| 391 { key::kPowerManagementUsesAudioActivity, | 391 { key::kPowerManagementUsesAudioActivity, |
| 392 prefs::kPowerUseAudioActivity, | 392 prefs::kPowerUseAudioActivity, |
| 393 Value::TYPE_BOOLEAN }, | 393 base::Value::TYPE_BOOLEAN }, |
| 394 { key::kPowerManagementUsesVideoActivity, | 394 { key::kPowerManagementUsesVideoActivity, |
| 395 prefs::kPowerUseVideoActivity, | 395 prefs::kPowerUseVideoActivity, |
| 396 Value::TYPE_BOOLEAN }, | 396 base::Value::TYPE_BOOLEAN }, |
| 397 { key::kAllowScreenWakeLocks, | 397 { key::kAllowScreenWakeLocks, |
| 398 prefs::kPowerAllowScreenWakeLocks, | 398 prefs::kPowerAllowScreenWakeLocks, |
| 399 Value::TYPE_BOOLEAN }, | 399 base::Value::TYPE_BOOLEAN }, |
| 400 { key::kWaitForInitialUserActivity, | 400 { key::kWaitForInitialUserActivity, |
| 401 prefs::kPowerWaitForInitialUserActivity, | 401 prefs::kPowerWaitForInitialUserActivity, |
| 402 Value::TYPE_BOOLEAN }, | 402 base::Value::TYPE_BOOLEAN }, |
| 403 { key::kTermsOfServiceURL, | 403 { key::kTermsOfServiceURL, |
| 404 prefs::kTermsOfServiceURL, | 404 prefs::kTermsOfServiceURL, |
| 405 Value::TYPE_STRING }, | 405 base::Value::TYPE_STRING }, |
| 406 { key::kShowAccessibilityOptionsInSystemTrayMenu, | 406 { key::kShowAccessibilityOptionsInSystemTrayMenu, |
| 407 prefs::kShouldAlwaysShowAccessibilityMenu, | 407 prefs::kShouldAlwaysShowAccessibilityMenu, |
| 408 Value::TYPE_BOOLEAN }, | 408 base::Value::TYPE_BOOLEAN }, |
| 409 { key::kLargeCursorEnabled, | 409 { key::kLargeCursorEnabled, |
| 410 prefs::kLargeCursorEnabled, | 410 prefs::kLargeCursorEnabled, |
| 411 Value::TYPE_BOOLEAN }, | 411 base::Value::TYPE_BOOLEAN }, |
| 412 { key::kSpokenFeedbackEnabled, | 412 { key::kSpokenFeedbackEnabled, |
| 413 prefs::kSpokenFeedbackEnabled, | 413 prefs::kSpokenFeedbackEnabled, |
| 414 Value::TYPE_BOOLEAN }, | 414 base::Value::TYPE_BOOLEAN }, |
| 415 { key::kHighContrastEnabled, | 415 { key::kHighContrastEnabled, |
| 416 prefs::kHighContrastEnabled, | 416 prefs::kHighContrastEnabled, |
| 417 Value::TYPE_BOOLEAN }, | 417 base::Value::TYPE_BOOLEAN }, |
| 418 { key::kDeviceLoginScreenDefaultLargeCursorEnabled, | 418 { key::kDeviceLoginScreenDefaultLargeCursorEnabled, |
| 419 NULL, | 419 NULL, |
| 420 Value::TYPE_BOOLEAN }, | 420 base::Value::TYPE_BOOLEAN }, |
| 421 { key::kDeviceLoginScreenDefaultSpokenFeedbackEnabled, | 421 { key::kDeviceLoginScreenDefaultSpokenFeedbackEnabled, |
| 422 NULL, | 422 NULL, |
| 423 Value::TYPE_BOOLEAN }, | 423 base::Value::TYPE_BOOLEAN }, |
| 424 { key::kDeviceLoginScreenDefaultHighContrastEnabled, | 424 { key::kDeviceLoginScreenDefaultHighContrastEnabled, |
| 425 NULL, | 425 NULL, |
| 426 Value::TYPE_BOOLEAN }, | 426 base::Value::TYPE_BOOLEAN }, |
| 427 { key::kRebootAfterUpdate, | 427 { key::kRebootAfterUpdate, |
| 428 prefs::kRebootAfterUpdate, | 428 prefs::kRebootAfterUpdate, |
| 429 Value::TYPE_BOOLEAN }, | 429 base::Value::TYPE_BOOLEAN }, |
| 430 { key::kAttestationEnabledForUser, | 430 { key::kAttestationEnabledForUser, |
| 431 prefs::kAttestationEnabled, | 431 prefs::kAttestationEnabled, |
| 432 Value::TYPE_BOOLEAN }, | 432 base::Value::TYPE_BOOLEAN }, |
| 433 { key::kChromeOsMultiProfileUserBehavior, | 433 { key::kChromeOsMultiProfileUserBehavior, |
| 434 prefs::kMultiProfileUserBehavior, | 434 prefs::kMultiProfileUserBehavior, |
| 435 Value::TYPE_STRING }, | 435 base::Value::TYPE_STRING }, |
| 436 #endif // defined(OS_CHROMEOS) | 436 #endif // defined(OS_CHROMEOS) |
| 437 | 437 |
| 438 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) | 438 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
| 439 { key::kBackgroundModeEnabled, | 439 { key::kBackgroundModeEnabled, |
| 440 prefs::kBackgroundModeEnabled, | 440 prefs::kBackgroundModeEnabled, |
| 441 Value::TYPE_BOOLEAN }, | 441 base::Value::TYPE_BOOLEAN }, |
| 442 #endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) | 442 #endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
| 443 | 443 |
| 444 #if defined(OS_ANDROID) | 444 #if defined(OS_ANDROID) |
| 445 { key::kDataCompressionProxyEnabled, | 445 { key::kDataCompressionProxyEnabled, |
| 446 prefs::kSpdyProxyAuthEnabled, | 446 prefs::kSpdyProxyAuthEnabled, |
| 447 Value::TYPE_BOOLEAN }, | 447 base::Value::TYPE_BOOLEAN }, |
| 448 #endif // defined(OS_ANDROID) | 448 #endif // defined(OS_ANDROID) |
| 449 }; | 449 }; |
| 450 | 450 |
| 451 // Mapping from extension type names to Manifest::Type. | 451 // Mapping from extension type names to Manifest::Type. |
| 452 StringToIntEnumListPolicyHandler::MappingEntry kExtensionAllowedTypesMap[] = { | 452 StringToIntEnumListPolicyHandler::MappingEntry kExtensionAllowedTypesMap[] = { |
| 453 { "extension", extensions::Manifest::TYPE_EXTENSION }, | 453 { "extension", extensions::Manifest::TYPE_EXTENSION }, |
| 454 { "theme", extensions::Manifest::TYPE_THEME }, | 454 { "theme", extensions::Manifest::TYPE_THEME }, |
| 455 { "user_script", extensions::Manifest::TYPE_USER_SCRIPT }, | 455 { "user_script", extensions::Manifest::TYPE_USER_SCRIPT }, |
| 456 { "hosted_app", extensions::Manifest::TYPE_HOSTED_APP }, | 456 { "hosted_app", extensions::Manifest::TYPE_HOSTED_APP }, |
| 457 { "legacy_packaged_app", extensions::Manifest::TYPE_LEGACY_PACKAGED_APP }, | 457 { "legacy_packaged_app", extensions::Manifest::TYPE_LEGACY_PACKAGED_APP }, |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 | 649 |
| 650 #if defined(OS_ANDROID) | 650 #if defined(OS_ANDROID) |
| 651 handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>( | 651 handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>( |
| 652 new ManagedBookmarksPolicyHandler())); | 652 new ManagedBookmarksPolicyHandler())); |
| 653 #endif | 653 #endif |
| 654 return handlers.Pass(); | 654 return handlers.Pass(); |
| 655 } | 655 } |
| 656 #endif // !defined(OS_IOS) | 656 #endif // !defined(OS_IOS) |
| 657 | 657 |
| 658 } // namespace policy | 658 } // namespace policy |
| OLD | NEW |