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/chromeos/policy/configuration_policy_handler_chromeos.h
" | 5 #include "chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h
" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "ash/magnifier/magnifier_constants.h" | 9 #include "ash/magnifier/magnifier_constants.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
12 #include "base/json/json_writer.h" | 12 #include "base/json/json_writer.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/prefs/pref_value_map.h" | 14 #include "base/prefs/pref_value_map.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "chrome/browser/chromeos/policy/login_screen_power_management_policy.h" | 17 #include "chrome/browser/chromeos/policy/login_screen_power_management_policy.h" |
18 #include "chrome/browser/policy/external_data_fetcher.h" | |
19 #include "chrome/browser/policy/policy_error_map.h" | 18 #include "chrome/browser/policy/policy_error_map.h" |
20 #include "chrome/browser/policy/policy_map.h" | |
21 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" | 19 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" |
22 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
23 #include "chromeos/dbus/power_policy_controller.h" | 21 #include "chromeos/dbus/power_policy_controller.h" |
24 #include "chromeos/network/onc/onc_signature.h" | 22 #include "chromeos/network/onc/onc_signature.h" |
25 #include "chromeos/network/onc/onc_utils.h" | 23 #include "chromeos/network/onc/onc_utils.h" |
26 #include "chromeos/network/onc/onc_validator.h" | 24 #include "chromeos/network/onc/onc_validator.h" |
27 #include "components/onc/onc_constants.h" | 25 #include "components/onc/onc_constants.h" |
| 26 #include "components/policy/core/common/external_data_fetcher.h" |
| 27 #include "components/policy/core/common/policy_map.h" |
28 #include "grit/generated_resources.h" | 28 #include "grit/generated_resources.h" |
29 #include "policy/policy_constants.h" | 29 #include "policy/policy_constants.h" |
30 | 30 |
31 namespace policy { | 31 namespace policy { |
32 | 32 |
33 // static | 33 // static |
34 NetworkConfigurationPolicyHandler* | 34 NetworkConfigurationPolicyHandler* |
35 NetworkConfigurationPolicyHandler::CreateForUserPolicy() { | 35 NetworkConfigurationPolicyHandler::CreateForUserPolicy() { |
36 return new NetworkConfigurationPolicyHandler( | 36 return new NetworkConfigurationPolicyHandler( |
37 key::kOpenNetworkConfiguration, | 37 key::kOpenNetworkConfiguration, |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 const base::Value* value = policies.GetValue(policy_name()); | 260 const base::Value* value = policies.GetValue(policy_name()); |
261 if (value && EnsureInRange(value, NULL, NULL)) { | 261 if (value && EnsureInRange(value, NULL, NULL)) { |
262 if (!prefs->GetValue(prefs::kPowerAcIdleAction, NULL)) | 262 if (!prefs->GetValue(prefs::kPowerAcIdleAction, NULL)) |
263 prefs->SetValue(prefs::kPowerAcIdleAction, value->DeepCopy()); | 263 prefs->SetValue(prefs::kPowerAcIdleAction, value->DeepCopy()); |
264 if (!prefs->GetValue(prefs::kPowerBatteryIdleAction, NULL)) | 264 if (!prefs->GetValue(prefs::kPowerBatteryIdleAction, NULL)) |
265 prefs->SetValue(prefs::kPowerBatteryIdleAction, value->DeepCopy()); | 265 prefs->SetValue(prefs::kPowerBatteryIdleAction, value->DeepCopy()); |
266 } | 266 } |
267 } | 267 } |
268 | 268 |
269 } // namespace policy | 269 } // namespace policy |
OLD | NEW |