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_status_collector.h" | 5 #include "chrome/browser/chromeos/policy/device_status_collector.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 bool ReadAndroidStatus( | 226 bool ReadAndroidStatus( |
227 const policy::DeviceStatusCollector::AndroidStatusReceiver& receiver) { | 227 const policy::DeviceStatusCollector::AndroidStatusReceiver& receiver) { |
228 auto* const arc_service_manager = arc::ArcServiceManager::Get(); | 228 auto* const arc_service_manager = arc::ArcServiceManager::Get(); |
229 if (!arc_service_manager) | 229 if (!arc_service_manager) |
230 return false; | 230 return false; |
231 auto* const instance_holder = | 231 auto* const instance_holder = |
232 arc_service_manager->arc_bridge_service()->enterprise_reporting(); | 232 arc_service_manager->arc_bridge_service()->enterprise_reporting(); |
233 if (!instance_holder) | 233 if (!instance_holder) |
234 return false; | 234 return false; |
235 auto* const instance = instance_holder->GetInstanceForMethod("GetStatus", 1); | 235 auto* const instance = |
| 236 ARC_GET_INSTANCE_FOR_METHOD(instance_holder, GetStatus); |
236 if (!instance) | 237 if (!instance) |
237 return false; | 238 return false; |
238 instance->GetStatus(receiver); | 239 instance->GetStatus(receiver); |
239 return true; | 240 return true; |
240 } | 241 } |
241 | 242 |
242 // Returns the DeviceLocalAccount associated with the current kiosk session. | 243 // Returns the DeviceLocalAccount associated with the current kiosk session. |
243 // Returns null if there is no active kiosk session, or if that kiosk | 244 // Returns null if there is no active kiosk session, or if that kiosk |
244 // session has been removed from policy since the session started, in which | 245 // session has been removed from policy since the session started, in which |
245 // case we won't report its status). | 246 // case we won't report its status). |
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 | 1198 |
1198 void DeviceStatusCollector::OnOSVersion(const std::string& version) { | 1199 void DeviceStatusCollector::OnOSVersion(const std::string& version) { |
1199 os_version_ = version; | 1200 os_version_ = version; |
1200 } | 1201 } |
1201 | 1202 |
1202 void DeviceStatusCollector::OnOSFirmware(const std::string& version) { | 1203 void DeviceStatusCollector::OnOSFirmware(const std::string& version) { |
1203 firmware_version_ = version; | 1204 firmware_version_ = version; |
1204 } | 1205 } |
1205 | 1206 |
1206 } // namespace policy | 1207 } // namespace policy |
OLD | NEW |