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/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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 prefs::kExtensionAllowedInstallSites)); | 386 prefs::kExtensionAllowedInstallSites)); |
386 | 387 |
387 #if !defined(OS_CHROMEOS) | 388 #if !defined(OS_CHROMEOS) |
388 handlers_.push_back(new DownloadDirPolicyHandler()); | 389 handlers_.push_back(new DownloadDirPolicyHandler()); |
389 #endif // !defined(OS_CHROMEOS) | 390 #endif // !defined(OS_CHROMEOS) |
390 | 391 |
391 #if defined(OS_CHROMEOS) | 392 #if defined(OS_CHROMEOS) |
392 handlers_.push_back( | 393 handlers_.push_back( |
393 new NetworkConfigurationPolicyHandler( | 394 new NetworkConfigurationPolicyHandler( |
394 key::kDeviceOpenNetworkConfiguration, | 395 key::kDeviceOpenNetworkConfiguration, |
395 chromeos::NetworkUIData::ONC_SOURCE_DEVICE_POLICY)); | 396 chromeos::onc::ONC_SOURCE_DEVICE_POLICY)); |
396 handlers_.push_back( | 397 handlers_.push_back( |
397 new NetworkConfigurationPolicyHandler( | 398 new NetworkConfigurationPolicyHandler( |
398 key::kOpenNetworkConfiguration, | 399 key::kOpenNetworkConfiguration, |
399 chromeos::NetworkUIData::ONC_SOURCE_USER_POLICY)); | 400 chromeos::onc::ONC_SOURCE_USER_POLICY)); |
400 handlers_.push_back(new PinnedLauncherAppsPolicyHandler()); | 401 handlers_.push_back(new PinnedLauncherAppsPolicyHandler()); |
401 #endif // defined(OS_CHROMEOS) | 402 #endif // defined(OS_CHROMEOS) |
402 } | 403 } |
403 | 404 |
404 ConfigurationPolicyHandlerList::~ConfigurationPolicyHandlerList() { | 405 ConfigurationPolicyHandlerList::~ConfigurationPolicyHandlerList() { |
405 STLDeleteElements(&handlers_); | 406 STLDeleteElements(&handlers_); |
406 } | 407 } |
407 | 408 |
408 void ConfigurationPolicyHandlerList::ApplyPolicySettings( | 409 void ConfigurationPolicyHandlerList::ApplyPolicySettings( |
409 const PolicyMap& policies, | 410 const PolicyMap& policies, |
(...skipping 18 matching lines...) Expand all Loading... |
428 } | 429 } |
429 | 430 |
430 void ConfigurationPolicyHandlerList::PrepareForDisplaying( | 431 void ConfigurationPolicyHandlerList::PrepareForDisplaying( |
431 PolicyMap* policies) const { | 432 PolicyMap* policies) const { |
432 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; | 433 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; |
433 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) | 434 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) |
434 (*handler)->PrepareForDisplaying(policies); | 435 (*handler)->PrepareForDisplaying(policies); |
435 } | 436 } |
436 | 437 |
437 } // namespace policy | 438 } // namespace policy |
OLD | NEW |