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

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

Issue 11299236: This moves the ONC parsing code into chromeos/network/onc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove translated strings Created 8 years 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/prefs/pref_value_map.h" 7 #include "base/prefs/pref_value_map.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/policy/configuration_policy_handler.h" 10 #include "chrome/browser/policy/configuration_policy_handler.h"
11 #include "chrome/browser/policy/policy_error_map.h" 11 #include "chrome/browser/policy/policy_error_map.h"
12 #include "chrome/browser/policy/policy_map.h" 12 #include "chrome/browser/policy/policy_map.h"
13 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 #include "chromeos/network/onc/onc_constants.h"
14 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
15 #include "policy/policy_constants.h" 16 #include "policy/policy_constants.h"
16 17
17 #if defined(OS_CHROMEOS) 18 #if defined(OS_CHROMEOS)
18 #include "chrome/browser/policy/configuration_policy_handler_chromeos.h" 19 #include "chrome/browser/policy/configuration_policy_handler_chromeos.h"
19 #endif // defined(OS_CHROMEOS) 20 #endif // defined(OS_CHROMEOS)
20 21
21 namespace policy { 22 namespace policy {
22 23
23 namespace { 24 namespace {
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 prefs::kExtensionAllowedInstallSites)); 380 prefs::kExtensionAllowedInstallSites));
380 381
381 #if !defined(OS_CHROMEOS) 382 #if !defined(OS_CHROMEOS)
382 handlers_.push_back(new DownloadDirPolicyHandler()); 383 handlers_.push_back(new DownloadDirPolicyHandler());
383 #endif // !defined(OS_CHROMEOS) 384 #endif // !defined(OS_CHROMEOS)
384 385
385 #if defined(OS_CHROMEOS) 386 #if defined(OS_CHROMEOS)
386 handlers_.push_back( 387 handlers_.push_back(
387 new NetworkConfigurationPolicyHandler( 388 new NetworkConfigurationPolicyHandler(
388 key::kDeviceOpenNetworkConfiguration, 389 key::kDeviceOpenNetworkConfiguration,
389 chromeos::NetworkUIData::ONC_SOURCE_DEVICE_POLICY)); 390 chromeos::onc::ONC_SOURCE_DEVICE_POLICY));
390 handlers_.push_back( 391 handlers_.push_back(
391 new NetworkConfigurationPolicyHandler( 392 new NetworkConfigurationPolicyHandler(
392 key::kOpenNetworkConfiguration, 393 key::kOpenNetworkConfiguration,
393 chromeos::NetworkUIData::ONC_SOURCE_USER_POLICY)); 394 chromeos::onc::ONC_SOURCE_USER_POLICY));
394 handlers_.push_back(new PinnedLauncherAppsPolicyHandler()); 395 handlers_.push_back(new PinnedLauncherAppsPolicyHandler());
395 #endif // defined(OS_CHROMEOS) 396 #endif // defined(OS_CHROMEOS)
396 } 397 }
397 398
398 ConfigurationPolicyHandlerList::~ConfigurationPolicyHandlerList() { 399 ConfigurationPolicyHandlerList::~ConfigurationPolicyHandlerList() {
399 STLDeleteElements(&handlers_); 400 STLDeleteElements(&handlers_);
400 } 401 }
401 402
402 void ConfigurationPolicyHandlerList::ApplyPolicySettings( 403 void ConfigurationPolicyHandlerList::ApplyPolicySettings(
403 const PolicyMap& policies, 404 const PolicyMap& policies,
(...skipping 18 matching lines...) Expand all
422 } 423 }
423 424
424 void ConfigurationPolicyHandlerList::PrepareForDisplaying( 425 void ConfigurationPolicyHandlerList::PrepareForDisplaying(
425 PolicyMap* policies) const { 426 PolicyMap* policies) const {
426 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; 427 std::vector<ConfigurationPolicyHandler*>::const_iterator handler;
427 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) 428 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler)
428 (*handler)->PrepareForDisplaying(policies); 429 (*handler)->PrepareForDisplaying(policies);
429 } 430 }
430 431
431 } // namespace policy 432 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698