OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/consumer_management_service.h" | 5 #include "chrome/browser/chromeos/policy/consumer_management_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 callback)); | 140 callback)); |
141 } | 141 } |
142 | 142 |
143 void ConsumerManagementService::OwnershipStatusChanged() { | 143 void ConsumerManagementService::OwnershipStatusChanged() { |
144 } | 144 } |
145 | 145 |
146 void ConsumerManagementService::DeviceSettingsUpdated() { | 146 void ConsumerManagementService::DeviceSettingsUpdated() { |
147 NotifyStatusChanged(); | 147 NotifyStatusChanged(); |
148 } | 148 } |
149 | 149 |
| 150 void ConsumerManagementService::OnDeviceSettingsServiceShutdown() { |
| 151 device_settings_service_ = nullptr; |
| 152 } |
| 153 |
150 void ConsumerManagementService::OnGetBootAttributeDone( | 154 void ConsumerManagementService::OnGetBootAttributeDone( |
151 const GetOwnerCallback& callback, | 155 const GetOwnerCallback& callback, |
152 chromeos::DBusMethodCallStatus call_status, | 156 chromeos::DBusMethodCallStatus call_status, |
153 bool dbus_success, | 157 bool dbus_success, |
154 const cryptohome::BaseReply& reply) { | 158 const cryptohome::BaseReply& reply) { |
155 if (!dbus_success || reply.error() != 0) { | 159 if (!dbus_success || reply.error() != 0) { |
156 LOG(ERROR) << "Failed to get the owner info from boot lockbox."; | 160 LOG(ERROR) << "Failed to get the owner info from boot lockbox."; |
157 callback.Run(""); | 161 callback.Run(""); |
158 return; | 162 return; |
159 } | 163 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 } | 197 } |
194 | 198 |
195 callback.Run(true); | 199 callback.Run(true); |
196 } | 200 } |
197 | 201 |
198 void ConsumerManagementService::NotifyStatusChanged() { | 202 void ConsumerManagementService::NotifyStatusChanged() { |
199 FOR_EACH_OBSERVER(Observer, observers_, OnConsumerManagementStatusChanged()); | 203 FOR_EACH_OBSERVER(Observer, observers_, OnConsumerManagementStatusChanged()); |
200 } | 204 } |
201 | 205 |
202 } // namespace policy | 206 } // namespace policy |
OLD | NEW |