Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.h" | 5 #include "chrome/browser/policy/configuration_policy_handler_list.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/policy/configuration_policy_handler.h" | 9 #include "chrome/browser/policy/configuration_policy_handler.h" |
| 10 #include "chrome/browser/policy/policy_error_map.h" | 10 #include "chrome/browser/policy/policy_error_map.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 Value::TYPE_LIST }, | 89 Value::TYPE_LIST }, |
| 90 { key::kEnabledPlugins, | 90 { key::kEnabledPlugins, |
| 91 prefs::kPluginsEnabledPlugins, | 91 prefs::kPluginsEnabledPlugins, |
| 92 Value::TYPE_LIST }, | 92 Value::TYPE_LIST }, |
| 93 { key::kShowHomeButton, | 93 { key::kShowHomeButton, |
| 94 prefs::kShowHomeButton, | 94 prefs::kShowHomeButton, |
| 95 Value::TYPE_BOOLEAN }, | 95 Value::TYPE_BOOLEAN }, |
| 96 { key::kSavingBrowserHistoryDisabled, | 96 { key::kSavingBrowserHistoryDisabled, |
| 97 prefs::kSavingBrowserHistoryDisabled, | 97 prefs::kSavingBrowserHistoryDisabled, |
| 98 Value::TYPE_BOOLEAN }, | 98 Value::TYPE_BOOLEAN }, |
| 99 { key::kClearSiteDataOnExit, | |
| 100 prefs::kClearSiteDataOnExit, | |
| 101 Value::TYPE_BOOLEAN }, | |
| 102 { key::kDeveloperToolsDisabled, | 99 { key::kDeveloperToolsDisabled, |
| 103 prefs::kDevToolsDisabled, | 100 prefs::kDevToolsDisabled, |
| 104 Value::TYPE_BOOLEAN }, | 101 Value::TYPE_BOOLEAN }, |
| 105 { key::kBlockThirdPartyCookies, | 102 { key::kBlockThirdPartyCookies, |
| 106 prefs::kBlockThirdPartyCookies, | 103 prefs::kBlockThirdPartyCookies, |
| 107 Value::TYPE_BOOLEAN }, | 104 Value::TYPE_BOOLEAN }, |
| 108 { key::kDefaultCookiesSetting, | 105 { key::kDefaultCookiesSetting, |
| 109 prefs::kManagedDefaultCookiesSetting, | 106 prefs::kManagedDefaultCookiesSetting, |
| 110 Value::TYPE_INTEGER }, | 107 Value::TYPE_INTEGER }, |
| 111 { key::kDefaultImagesSetting, | 108 { key::kDefaultImagesSetting, |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 317 kSimplePolicyMap[i].preference_path, | 314 kSimplePolicyMap[i].preference_path, |
| 318 kSimplePolicyMap[i].value_type)); | 315 kSimplePolicyMap[i].value_type)); |
| 319 } | 316 } |
| 320 | 317 |
| 321 handlers_.push_back(new AutofillPolicyHandler()); | 318 handlers_.push_back(new AutofillPolicyHandler()); |
| 322 handlers_.push_back(new DefaultSearchPolicyHandler()); | 319 handlers_.push_back(new DefaultSearchPolicyHandler()); |
| 323 handlers_.push_back(new DiskCacheDirPolicyHandler()); | 320 handlers_.push_back(new DiskCacheDirPolicyHandler()); |
| 324 handlers_.push_back(new FileSelectionDialogsHandler()); | 321 handlers_.push_back(new FileSelectionDialogsHandler()); |
| 325 handlers_.push_back(new IncognitoModePolicyHandler()); | 322 handlers_.push_back(new IncognitoModePolicyHandler()); |
| 326 handlers_.push_back(new JavascriptPolicyHandler()); | 323 handlers_.push_back(new JavascriptPolicyHandler()); |
| 324 handlers_.push_back(new ClearSiteDataOnExitPolicyHandler()); | |
|
Joao da Silva
2012/06/19 10:23:55
Nit: these were in alphabetical order.
Mattias Nissler (ping if slow)
2012/06/20 08:15:40
Done.
| |
| 327 handlers_.push_back(new ProxyPolicyHandler()); | 325 handlers_.push_back(new ProxyPolicyHandler()); |
| 328 handlers_.push_back(new RestoreOnStartupPolicyHandler()); | 326 handlers_.push_back(new RestoreOnStartupPolicyHandler()); |
| 329 handlers_.push_back(new SyncPolicyHandler()); | 327 handlers_.push_back(new SyncPolicyHandler()); |
| 330 | 328 |
| 331 handlers_.push_back( | 329 handlers_.push_back( |
| 332 new ExtensionListPolicyHandler(key::kExtensionInstallWhitelist, | 330 new ExtensionListPolicyHandler(key::kExtensionInstallWhitelist, |
| 333 prefs::kExtensionInstallAllowList, | 331 prefs::kExtensionInstallAllowList, |
| 334 false)); | 332 false)); |
| 335 handlers_.push_back( | 333 handlers_.push_back( |
| 336 new ExtensionListPolicyHandler(key::kExtensionInstallBlacklist, | 334 new ExtensionListPolicyHandler(key::kExtensionInstallBlacklist, |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 385 } | 383 } |
| 386 | 384 |
| 387 void ConfigurationPolicyHandlerList::PrepareForDisplaying( | 385 void ConfigurationPolicyHandlerList::PrepareForDisplaying( |
| 388 PolicyMap* policies) const { | 386 PolicyMap* policies) const { |
| 389 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; | 387 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; |
| 390 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) | 388 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) |
| 391 (*handler)->PrepareForDisplaying(policies); | 389 (*handler)->PrepareForDisplaying(policies); |
| 392 } | 390 } |
| 393 | 391 |
| 394 } // namespace policy | 392 } // namespace policy |
| OLD | NEW |