| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 if (!user_manager::UserManager::Get()->IsLoggedInAsKioskApp()) | 227 if (!user_manager::UserManager::Get()->IsLoggedInAsKioskApp()) |
| 228 return std::unique_ptr<policy::DeviceLocalAccount>(); | 228 return std::unique_ptr<policy::DeviceLocalAccount>(); |
| 229 const user_manager::User* const user = | 229 const user_manager::User* const user = |
| 230 user_manager::UserManager::Get()->GetActiveUser(); | 230 user_manager::UserManager::Get()->GetActiveUser(); |
| 231 const std::vector<policy::DeviceLocalAccount> accounts = | 231 const std::vector<policy::DeviceLocalAccount> accounts = |
| 232 policy::GetDeviceLocalAccounts(settings); | 232 policy::GetDeviceLocalAccounts(settings); |
| 233 | 233 |
| 234 for (const auto& device_local_account : accounts) { | 234 for (const auto& device_local_account : accounts) { |
| 235 if (AccountId::FromUserEmail(device_local_account.user_id) == | 235 if (AccountId::FromUserEmail(device_local_account.user_id) == |
| 236 user->GetAccountId()) { | 236 user->GetAccountId()) { |
| 237 return base::WrapUnique( | 237 return base::MakeUnique<policy::DeviceLocalAccount>(device_local_account); |
| 238 new policy::DeviceLocalAccount(device_local_account)); | |
| 239 } | 238 } |
| 240 } | 239 } |
| 241 LOG(WARNING) << "Kiosk app not found in list of device-local accounts"; | 240 LOG(WARNING) << "Kiosk app not found in list of device-local accounts"; |
| 242 return std::unique_ptr<policy::DeviceLocalAccount>(); | 241 return std::unique_ptr<policy::DeviceLocalAccount>(); |
| 243 } | 242 } |
| 244 | 243 |
| 245 base::Version GetPlatformVersion() { | 244 base::Version GetPlatformVersion() { |
| 246 int32_t major_version; | 245 int32_t major_version; |
| 247 int32_t minor_version; | 246 int32_t minor_version; |
| 248 int32_t bugfix_version; | 247 int32_t bugfix_version; |
| (...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 ScheduleGeolocationUpdateRequest(); | 1159 ScheduleGeolocationUpdateRequest(); |
| 1161 } | 1160 } |
| 1162 | 1161 |
| 1163 void DeviceStatusCollector::ReceiveVolumeInfo( | 1162 void DeviceStatusCollector::ReceiveVolumeInfo( |
| 1164 const std::vector<em::VolumeInfo>& info) { | 1163 const std::vector<em::VolumeInfo>& info) { |
| 1165 if (report_hardware_status_) | 1164 if (report_hardware_status_) |
| 1166 volume_info_ = info; | 1165 volume_info_ = info; |
| 1167 } | 1166 } |
| 1168 | 1167 |
| 1169 } // namespace policy | 1168 } // namespace policy |
| OLD | NEW |