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/device_cloud_policy_store_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/metrics/histogram_macros.h" | 11 #include "base/metrics/histogram_macros.h" |
12 #include "base/sequenced_task_runner.h" | 12 #include "base/sequenced_task_runner.h" |
13 #include "chrome/browser/chromeos/login/startup_utils.h" | 13 #include "chrome/browser/chromeos/login/startup_utils.h" |
14 #include "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h" | 14 #include "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h" |
15 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" | |
16 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" | 15 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" |
| 16 #include "chrome/browser/chromeos/settings/install_attributes.h" |
17 #include "components/ownership/owner_key_util.h" | 17 #include "components/ownership/owner_key_util.h" |
18 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 18 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
19 #include "components/policy/proto/device_management_backend.pb.h" | 19 #include "components/policy/proto/device_management_backend.pb.h" |
20 | 20 |
21 namespace em = enterprise_management; | 21 namespace em = enterprise_management; |
22 | 22 |
23 namespace policy { | 23 namespace policy { |
24 | 24 |
25 DeviceCloudPolicyStoreChromeOS::DeviceCloudPolicyStoreChromeOS( | 25 DeviceCloudPolicyStoreChromeOS::DeviceCloudPolicyStoreChromeOS( |
26 chromeos::DeviceSettingsService* device_settings_service, | 26 chromeos::DeviceSettingsService* device_settings_service, |
27 EnterpriseInstallAttributes* install_attributes, | 27 chromeos::InstallAttributes* install_attributes, |
28 scoped_refptr<base::SequencedTaskRunner> background_task_runner) | 28 scoped_refptr<base::SequencedTaskRunner> background_task_runner) |
29 : device_settings_service_(device_settings_service), | 29 : device_settings_service_(device_settings_service), |
30 install_attributes_(install_attributes), | 30 install_attributes_(install_attributes), |
31 background_task_runner_(background_task_runner), | 31 background_task_runner_(background_task_runner), |
32 enrollment_validation_done_(false), | 32 enrollment_validation_done_(false), |
33 weak_factory_(this) { | 33 weak_factory_(this) { |
34 device_settings_service_->AddObserver(this); | 34 device_settings_service_->AddObserver(this); |
35 } | 35 } |
36 | 36 |
37 DeviceCloudPolicyStoreChromeOS::~DeviceCloudPolicyStoreChromeOS() { | 37 DeviceCloudPolicyStoreChromeOS::~DeviceCloudPolicyStoreChromeOS() { |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 case chromeos::DeviceSettingsService::STORE_VALIDATION_ERROR: | 217 case chromeos::DeviceSettingsService::STORE_VALIDATION_ERROR: |
218 case chromeos::DeviceSettingsService::STORE_TEMP_VALIDATION_ERROR: | 218 case chromeos::DeviceSettingsService::STORE_TEMP_VALIDATION_ERROR: |
219 status_ = STATUS_LOAD_ERROR; | 219 status_ = STATUS_LOAD_ERROR; |
220 break; | 220 break; |
221 } | 221 } |
222 | 222 |
223 NotifyStoreError(); | 223 NotifyStoreError(); |
224 } | 224 } |
225 | 225 |
226 } // namespace policy | 226 } // namespace policy |
OLD | NEW |