OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_pref_store.h" | 5 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 prefs::kPluginsPluginsBlacklist}, | 153 prefs::kPluginsPluginsBlacklist}, |
154 { Value::TYPE_BOOLEAN, kPolicyShowHomeButton, | 154 { Value::TYPE_BOOLEAN, kPolicyShowHomeButton, |
155 prefs::kShowHomeButton }, | 155 prefs::kShowHomeButton }, |
156 { Value::TYPE_BOOLEAN, kPolicyJavascriptEnabled, | 156 { Value::TYPE_BOOLEAN, kPolicyJavascriptEnabled, |
157 prefs::kWebKitJavascriptEnabled }, | 157 prefs::kWebKitJavascriptEnabled }, |
158 { Value::TYPE_BOOLEAN, kPolicySavingBrowserHistoryDisabled, | 158 { Value::TYPE_BOOLEAN, kPolicySavingBrowserHistoryDisabled, |
159 prefs::kSavingBrowserHistoryDisabled }, | 159 prefs::kSavingBrowserHistoryDisabled }, |
160 { Value::TYPE_BOOLEAN, kPolicyDeveloperToolsDisabled, | 160 { Value::TYPE_BOOLEAN, kPolicyDeveloperToolsDisabled, |
161 prefs::kDevToolsDisabled }, | 161 prefs::kDevToolsDisabled }, |
162 { Value::TYPE_BOOLEAN, kPolicyBlockThirdPartyCookies, | 162 { Value::TYPE_BOOLEAN, kPolicyBlockThirdPartyCookies, |
163 prefs::kBlockThirdPartyCookies}, | 163 prefs::kBlockThirdPartyCookies }, |
164 { Value::TYPE_INTEGER, kPolicyDefaultCookiesSetting, | 164 { Value::TYPE_INTEGER, kPolicyDefaultCookiesSetting, |
165 prefs::kManagedDefaultCookiesSetting}, | 165 prefs::kManagedDefaultCookiesSetting }, |
166 { Value::TYPE_INTEGER, kPolicyDefaultImagesSetting, | 166 { Value::TYPE_INTEGER, kPolicyDefaultImagesSetting, |
167 prefs::kManagedDefaultImagesSetting}, | 167 prefs::kManagedDefaultImagesSetting }, |
168 { Value::TYPE_INTEGER, kPolicyDefaultJavaScriptSetting, | 168 { Value::TYPE_INTEGER, kPolicyDefaultJavaScriptSetting, |
169 prefs::kManagedDefaultJavaScriptSetting}, | 169 prefs::kManagedDefaultJavaScriptSetting }, |
170 { Value::TYPE_INTEGER, kPolicyDefaultPluginsSetting, | 170 { Value::TYPE_INTEGER, kPolicyDefaultPluginsSetting, |
171 prefs::kManagedDefaultPluginsSetting}, | 171 prefs::kManagedDefaultPluginsSetting }, |
172 { Value::TYPE_INTEGER, kPolicyDefaultPopupsSetting, | 172 { Value::TYPE_INTEGER, kPolicyDefaultPopupsSetting, |
173 prefs::kManagedDefaultPopupsSetting}, | 173 prefs::kManagedDefaultPopupsSetting }, |
| 174 { Value::TYPE_INTEGER, kPolicyDefaultNotificationSetting, |
| 175 prefs::kDesktopNotificationDefaultContentSetting }, |
174 { Value::TYPE_STRING, kPolicyAuthSchemes, | 176 { Value::TYPE_STRING, kPolicyAuthSchemes, |
175 prefs::kAuthSchemes }, | 177 prefs::kAuthSchemes }, |
176 { Value::TYPE_BOOLEAN, kPolicyDisableAuthNegotiateCnameLookup, | 178 { Value::TYPE_BOOLEAN, kPolicyDisableAuthNegotiateCnameLookup, |
177 prefs::kDisableAuthNegotiateCnameLookup }, | 179 prefs::kDisableAuthNegotiateCnameLookup }, |
178 { Value::TYPE_BOOLEAN, kPolicyEnableAuthNegotiatePort, | 180 { Value::TYPE_BOOLEAN, kPolicyEnableAuthNegotiatePort, |
179 prefs::kEnableAuthNegotiatePort }, | 181 prefs::kEnableAuthNegotiatePort }, |
180 { Value::TYPE_STRING, kPolicyAuthServerWhitelist, | 182 { Value::TYPE_STRING, kPolicyAuthServerWhitelist, |
181 prefs::kAuthServerWhitelist }, | 183 prefs::kAuthServerWhitelist }, |
182 { Value::TYPE_STRING, kPolicyAuthNegotiateDelegateWhitelist, | 184 { Value::TYPE_STRING, kPolicyAuthNegotiateDelegateWhitelist, |
183 prefs::kAuthNegotiateDelegateWhitelist }, | 185 prefs::kAuthNegotiateDelegateWhitelist }, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 { kPolicyShowHomeButton, Value::TYPE_BOOLEAN, key::kShowHomeButton }, | 274 { kPolicyShowHomeButton, Value::TYPE_BOOLEAN, key::kShowHomeButton }, |
273 { kPolicyPrintingEnabled, Value::TYPE_BOOLEAN, key::kPrintingEnabled }, | 275 { kPolicyPrintingEnabled, Value::TYPE_BOOLEAN, key::kPrintingEnabled }, |
274 { kPolicyJavascriptEnabled, Value::TYPE_BOOLEAN, key::kJavascriptEnabled }, | 276 { kPolicyJavascriptEnabled, Value::TYPE_BOOLEAN, key::kJavascriptEnabled }, |
275 { kPolicySavingBrowserHistoryDisabled, Value::TYPE_BOOLEAN, | 277 { kPolicySavingBrowserHistoryDisabled, Value::TYPE_BOOLEAN, |
276 key::kSavingBrowserHistoryDisabled }, | 278 key::kSavingBrowserHistoryDisabled }, |
277 { kPolicyDeveloperToolsDisabled, Value::TYPE_BOOLEAN, | 279 { kPolicyDeveloperToolsDisabled, Value::TYPE_BOOLEAN, |
278 key::kDeveloperToolsDisabled }, | 280 key::kDeveloperToolsDisabled }, |
279 { kPolicyBlockThirdPartyCookies, Value::TYPE_BOOLEAN, | 281 { kPolicyBlockThirdPartyCookies, Value::TYPE_BOOLEAN, |
280 key::kBlockThirdPartyCookies }, | 282 key::kBlockThirdPartyCookies }, |
281 { kPolicyDefaultCookiesSetting, Value::TYPE_INTEGER, | 283 { kPolicyDefaultCookiesSetting, Value::TYPE_INTEGER, |
282 key::kDefaultCookiesSetting}, | 284 key::kDefaultCookiesSetting }, |
283 { kPolicyDefaultImagesSetting, Value::TYPE_INTEGER, | 285 { kPolicyDefaultImagesSetting, Value::TYPE_INTEGER, |
284 key::kDefaultImagesSetting}, | 286 key::kDefaultImagesSetting }, |
285 { kPolicyDefaultJavaScriptSetting, Value::TYPE_INTEGER, | 287 { kPolicyDefaultJavaScriptSetting, Value::TYPE_INTEGER, |
286 key::kDefaultJavaScriptSetting}, | 288 key::kDefaultJavaScriptSetting }, |
287 { kPolicyDefaultPluginsSetting, Value::TYPE_INTEGER, | 289 { kPolicyDefaultPluginsSetting, Value::TYPE_INTEGER, |
288 key::kDefaultPluginsSetting}, | 290 key::kDefaultPluginsSetting }, |
289 { kPolicyDefaultPopupsSetting, Value::TYPE_INTEGER, | 291 { kPolicyDefaultPopupsSetting, Value::TYPE_INTEGER, |
290 key::kDefaultPopupsSetting}, | 292 key::kDefaultPopupsSetting }, |
| 293 { kPolicyDefaultNotificationSetting, Value::TYPE_INTEGER, |
| 294 key::kDefaultNotificationSetting }, |
291 { kPolicyAuthSchemes, Value::TYPE_STRING, key::kAuthSchemes }, | 295 { kPolicyAuthSchemes, Value::TYPE_STRING, key::kAuthSchemes }, |
292 { kPolicyDisableAuthNegotiateCnameLookup, Value::TYPE_BOOLEAN, | 296 { kPolicyDisableAuthNegotiateCnameLookup, Value::TYPE_BOOLEAN, |
293 key::kDisableAuthNegotiateCnameLookup }, | 297 key::kDisableAuthNegotiateCnameLookup }, |
294 { kPolicyEnableAuthNegotiatePort, Value::TYPE_BOOLEAN, | 298 { kPolicyEnableAuthNegotiatePort, Value::TYPE_BOOLEAN, |
295 key::kEnableAuthNegotiatePort }, | 299 key::kEnableAuthNegotiatePort }, |
296 { kPolicyAuthServerWhitelist, Value::TYPE_STRING, | 300 { kPolicyAuthServerWhitelist, Value::TYPE_STRING, |
297 key::kAuthServerWhitelist }, | 301 key::kAuthServerWhitelist }, |
298 { kPolicyAuthNegotiateDelegateWhitelist, Value::TYPE_STRING, | 302 { kPolicyAuthNegotiateDelegateWhitelist, Value::TYPE_STRING, |
299 key::kAuthNegotiateDelegateWhitelist }, | 303 key::kAuthNegotiateDelegateWhitelist }, |
300 { kPolicyGSSAPILibraryName, Value::TYPE_STRING, | 304 { kPolicyGSSAPILibraryName, Value::TYPE_STRING, |
301 key::kGSSAPILibraryName }, | 305 key::kGSSAPILibraryName }, |
302 | 306 |
303 | |
304 #if defined(OS_CHROMEOS) | 307 #if defined(OS_CHROMEOS) |
305 { kPolicyChromeOsLockOnIdleSuspend, Value::TYPE_BOOLEAN, | 308 { kPolicyChromeOsLockOnIdleSuspend, Value::TYPE_BOOLEAN, |
306 key::kChromeOsLockOnIdleSuspend }, | 309 key::kChromeOsLockOnIdleSuspend }, |
307 #endif | 310 #endif |
308 }; | 311 }; |
309 | 312 |
310 static ConfigurationPolicyProvider::PolicyDefinitionList policy_list = { | 313 static ConfigurationPolicyProvider::PolicyDefinitionList policy_list = { |
311 entries, | 314 entries, |
312 entries + arraysize(entries), | 315 entries + arraysize(entries), |
313 }; | 316 }; |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 std::string()); | 646 std::string()); |
644 return; | 647 return; |
645 } | 648 } |
646 } | 649 } |
647 // Required entries are not there. Remove any related entries. | 650 // Required entries are not there. Remove any related entries. |
648 RemovePreferencesOfMap(kDefaultSearchPolicyMap, | 651 RemovePreferencesOfMap(kDefaultSearchPolicyMap, |
649 arraysize(kDefaultSearchPolicyMap)); | 652 arraysize(kDefaultSearchPolicyMap)); |
650 } | 653 } |
651 | 654 |
652 } // namespace policy | 655 } // namespace policy |
OLD | NEW |