Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: chrome/browser/policy/configuration_policy_handler_list.cc

Issue 10542048: Add a group policy controlling which sites can install extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 handlers_.push_back(new SyncPolicyHandler()); 329 handlers_.push_back(new SyncPolicyHandler());
330 330
331 handlers_.push_back( 331 handlers_.push_back(
332 new ExtensionListPolicyHandler(key::kExtensionInstallWhitelist, 332 new ExtensionListPolicyHandler(key::kExtensionInstallWhitelist,
333 prefs::kExtensionInstallAllowList, 333 prefs::kExtensionInstallAllowList,
334 false)); 334 false));
335 handlers_.push_back( 335 handlers_.push_back(
336 new ExtensionListPolicyHandler(key::kExtensionInstallBlacklist, 336 new ExtensionListPolicyHandler(key::kExtensionInstallBlacklist,
337 prefs::kExtensionInstallDenyList, 337 prefs::kExtensionInstallDenyList,
338 true)); 338 true));
339 handlers_.push_back(
340 new ExtensionURLPatternListPolicyHandler(
341 key::kExtensionInstallSources,
342 prefs::kExtensionAllowedInstallSites));
339 343
340 #if !defined(OS_CHROMEOS) 344 #if !defined(OS_CHROMEOS)
341 handlers_.push_back(new DownloadDirPolicyHandler()); 345 handlers_.push_back(new DownloadDirPolicyHandler());
342 #endif // !defined(OS_CHROMEOS) 346 #endif // !defined(OS_CHROMEOS)
343 347
344 #if defined(OS_CHROMEOS) 348 #if defined(OS_CHROMEOS)
345 handlers_.push_back( 349 handlers_.push_back(
346 new NetworkConfigurationPolicyHandler( 350 new NetworkConfigurationPolicyHandler(
347 key::kDeviceOpenNetworkConfiguration, 351 key::kDeviceOpenNetworkConfiguration,
348 chromeos::NetworkUIData::ONC_SOURCE_DEVICE_POLICY)); 352 chromeos::NetworkUIData::ONC_SOURCE_DEVICE_POLICY));
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 385 }
382 386
383 void ConfigurationPolicyHandlerList::PrepareForDisplaying( 387 void ConfigurationPolicyHandlerList::PrepareForDisplaying(
384 PolicyMap* policies) const { 388 PolicyMap* policies) const {
385 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; 389 std::vector<ConfigurationPolicyHandler*>::const_iterator handler;
386 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) 390 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler)
387 (*handler)->PrepareForDisplaying(policies); 391 (*handler)->PrepareForDisplaying(policies);
388 } 392 }
389 393
390 } // namespace policy 394 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_handler.cc ('k') | chrome/browser/policy/configuration_policy_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698