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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 } | 144 } |
145 | 145 |
146 void ConsumerManagementService::DeviceSettingsUpdated() { | 146 void ConsumerManagementService::DeviceSettingsUpdated() { |
147 NotifyStatusChanged(); | 147 NotifyStatusChanged(); |
148 } | 148 } |
149 | 149 |
150 void ConsumerManagementService::OnDeviceSettingsServiceShutdown() { | 150 void ConsumerManagementService::OnDeviceSettingsServiceShutdown() { |
151 device_settings_service_ = nullptr; | 151 device_settings_service_ = nullptr; |
152 } | 152 } |
153 | 153 |
| 154 void ConsumerManagementService::NotifyStatusChanged() { |
| 155 FOR_EACH_OBSERVER(Observer, observers_, OnConsumerManagementStatusChanged()); |
| 156 } |
| 157 |
154 void ConsumerManagementService::OnGetBootAttributeDone( | 158 void ConsumerManagementService::OnGetBootAttributeDone( |
155 const GetOwnerCallback& callback, | 159 const GetOwnerCallback& callback, |
156 chromeos::DBusMethodCallStatus call_status, | 160 chromeos::DBusMethodCallStatus call_status, |
157 bool dbus_success, | 161 bool dbus_success, |
158 const cryptohome::BaseReply& reply) { | 162 const cryptohome::BaseReply& reply) { |
159 if (!dbus_success || reply.error() != 0) { | 163 if (!dbus_success || reply.error() != 0) { |
160 LOG(ERROR) << "Failed to get the owner info from boot lockbox."; | 164 LOG(ERROR) << "Failed to get the owner info from boot lockbox."; |
161 callback.Run(""); | 165 callback.Run(""); |
162 return; | 166 return; |
163 } | 167 } |
(...skipping 28 matching lines...) Expand all Loading... |
192 const cryptohome::BaseReply& reply) { | 196 const cryptohome::BaseReply& reply) { |
193 if (!dbus_success || reply.error() != 0) { | 197 if (!dbus_success || reply.error() != 0) { |
194 LOG(ERROR) << "Failed to flush and sign boot lockbox."; | 198 LOG(ERROR) << "Failed to flush and sign boot lockbox."; |
195 callback.Run(false); | 199 callback.Run(false); |
196 return; | 200 return; |
197 } | 201 } |
198 | 202 |
199 callback.Run(true); | 203 callback.Run(true); |
200 } | 204 } |
201 | 205 |
202 void ConsumerManagementService::NotifyStatusChanged() { | |
203 FOR_EACH_OBSERVER(Observer, observers_, OnConsumerManagementStatusChanged()); | |
204 } | |
205 | |
206 } // namespace policy | 206 } // namespace policy |
OLD | NEW |