| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <utility> | 11 #include <utility> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "ash/common/accessibility_types.h" |
| 14 #include "base/callback.h" | 15 #include "base/callback.h" |
| 15 #include "base/json/json_reader.h" | 16 #include "base/json/json_reader.h" |
| 16 #include "base/json/json_writer.h" | 17 #include "base/json/json_writer.h" |
| 17 #include "base/logging.h" | 18 #include "base/logging.h" |
| 18 #include "base/memory/ptr_util.h" | 19 #include "base/memory/ptr_util.h" |
| 19 #include "base/strings/string_number_conversions.h" | 20 #include "base/strings/string_number_conversions.h" |
| 20 #include "base/strings/string_util.h" | 21 #include "base/strings/string_util.h" |
| 21 #include "base/values.h" | 22 #include "base/values.h" |
| 22 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" | 23 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" |
| 23 #include "chrome/common/pref_names.h" | 24 #include "chrome/common/pref_names.h" |
| 24 #include "chromeos/dbus/power_policy_controller.h" | 25 #include "chromeos/dbus/power_policy_controller.h" |
| 25 #include "chromeos/network/onc/onc_signature.h" | 26 #include "chromeos/network/onc/onc_signature.h" |
| 26 #include "chromeos/network/onc/onc_utils.h" | 27 #include "chromeos/network/onc/onc_utils.h" |
| 27 #include "chromeos/network/onc/onc_validator.h" | 28 #include "chromeos/network/onc/onc_validator.h" |
| 28 #include "components/onc/onc_constants.h" | 29 #include "components/onc/onc_constants.h" |
| 29 #include "components/policy/core/browser/policy_error_map.h" | 30 #include "components/policy/core/browser/policy_error_map.h" |
| 30 #include "components/policy/core/common/external_data_fetcher.h" | 31 #include "components/policy/core/common/external_data_fetcher.h" |
| 31 #include "components/policy/core/common/policy_map.h" | 32 #include "components/policy/core/common/policy_map.h" |
| 32 #include "components/policy/core/common/schema.h" | 33 #include "components/policy/core/common/schema.h" |
| 33 #include "components/prefs/pref_value_map.h" | 34 #include "components/prefs/pref_value_map.h" |
| 34 #include "crypto/sha2.h" | 35 #include "crypto/sha2.h" |
| 35 #include "grit/components_strings.h" | 36 #include "grit/components_strings.h" |
| 36 #include "policy/policy_constants.h" | 37 #include "policy/policy_constants.h" |
| 37 #include "ui/chromeos/accessibility_types.h" | |
| 38 #include "url/gurl.h" | 38 #include "url/gurl.h" |
| 39 | 39 |
| 40 namespace policy { | 40 namespace policy { |
| 41 | 41 |
| 42 namespace { | 42 namespace { |
| 43 | 43 |
| 44 const char kSubkeyURL[] = "url"; | 44 const char kSubkeyURL[] = "url"; |
| 45 const char kSubkeyHash[] = "hash"; | 45 const char kSubkeyHash[] = "hash"; |
| 46 | 46 |
| 47 bool GetSubkeyString(const base::DictionaryValue& dict, | 47 bool GetSubkeyString(const base::DictionaryValue& dict, |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 | 478 |
| 479 value = GetValue(dict, kScreenLockDelayAC); | 479 value = GetValue(dict, kScreenLockDelayAC); |
| 480 if (value) | 480 if (value) |
| 481 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, std::move(value)); | 481 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, std::move(value)); |
| 482 value = GetValue(dict, kScreenLockDelayBattery); | 482 value = GetValue(dict, kScreenLockDelayBattery); |
| 483 if (value) | 483 if (value) |
| 484 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, std::move(value)); | 484 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, std::move(value)); |
| 485 } | 485 } |
| 486 | 486 |
| 487 } // namespace policy | 487 } // namespace policy |
| OLD | NEW |