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_manager_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h" | 9 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h" |
10 #include "chrome/browser/chromeos/policy/enrollment_handler_chromeos.h" | 10 #include "chrome/browser/chromeos/policy/enrollment_handler_chromeos.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 enrollment_handler_->StartEnrollment(); | 97 enrollment_handler_->StartEnrollment(); |
98 } | 98 } |
99 | 99 |
100 void DeviceCloudPolicyManagerChromeOS::CancelEnrollment() { | 100 void DeviceCloudPolicyManagerChromeOS::CancelEnrollment() { |
101 if (enrollment_handler_.get()) { | 101 if (enrollment_handler_.get()) { |
102 enrollment_handler_.reset(); | 102 enrollment_handler_.reset(); |
103 StartIfManaged(); | 103 StartIfManaged(); |
104 } | 104 } |
105 } | 105 } |
106 | 106 |
| 107 void DeviceCloudPolicyManagerChromeOS::Shutdown() { |
| 108 CloudPolicyManager::Shutdown(); |
| 109 device_status_provider_.reset(); |
| 110 } |
| 111 |
107 void DeviceCloudPolicyManagerChromeOS::OnStoreLoaded(CloudPolicyStore* store) { | 112 void DeviceCloudPolicyManagerChromeOS::OnStoreLoaded(CloudPolicyStore* store) { |
108 CloudPolicyManager::OnStoreLoaded(store); | 113 CloudPolicyManager::OnStoreLoaded(store); |
109 | 114 |
110 if (!enrollment_handler_.get()) | 115 if (!enrollment_handler_.get()) |
111 StartIfManaged(); | 116 StartIfManaged(); |
112 } | 117 } |
113 | 118 |
114 // static | 119 // static |
115 std::string DeviceCloudPolicyManagerChromeOS::GetMachineID() { | 120 std::string DeviceCloudPolicyManagerChromeOS::GetMachineID() { |
116 std::string machine_id; | 121 std::string machine_id; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 store()->is_managed() && | 178 store()->is_managed() && |
174 !service()) { | 179 !service()) { |
175 core()->Connect(CreateClient()); | 180 core()->Connect(CreateClient()); |
176 core()->StartRefreshScheduler(); | 181 core()->StartRefreshScheduler(); |
177 core()->TrackRefreshDelayPref(local_state_, | 182 core()->TrackRefreshDelayPref(local_state_, |
178 prefs::kDevicePolicyRefreshRate); | 183 prefs::kDevicePolicyRefreshRate); |
179 } | 184 } |
180 } | 185 } |
181 | 186 |
182 } // namespace policy | 187 } // namespace policy |
OLD | NEW |