Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: chrome/browser/chromeos/policy/device_status_collector.cc

Issue 1557693002: Convert Pass()→std::move() in //chrome/browser/chromeos/policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include <sys/statvfs.h> 9 #include <sys/statvfs.h>
10 #include <cstdio> 10 #include <cstdio>
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 return scoped_ptr<policy::DeviceLocalAccount>(); 219 return scoped_ptr<policy::DeviceLocalAccount>();
220 const user_manager::User* const user = 220 const user_manager::User* const user =
221 user_manager::UserManager::Get()->GetActiveUser(); 221 user_manager::UserManager::Get()->GetActiveUser();
222 const std::vector<policy::DeviceLocalAccount> accounts = 222 const std::vector<policy::DeviceLocalAccount> accounts =
223 policy::GetDeviceLocalAccounts(settings); 223 policy::GetDeviceLocalAccounts(settings);
224 224
225 for (const auto& device_local_account : accounts) { 225 for (const auto& device_local_account : accounts) {
226 if (AccountId::FromUserEmail(device_local_account.user_id) == 226 if (AccountId::FromUserEmail(device_local_account.user_id) ==
227 user->GetAccountId()) { 227 user->GetAccountId()) {
228 return make_scoped_ptr( 228 return make_scoped_ptr(
229 new policy::DeviceLocalAccount(device_local_account)).Pass(); 229 new policy::DeviceLocalAccount(device_local_account));
230 } 230 }
231 } 231 }
232 LOG(WARNING) << "Kiosk app not found in list of device-local accounts"; 232 LOG(WARNING) << "Kiosk app not found in list of device-local accounts";
233 return scoped_ptr<policy::DeviceLocalAccount>(); 233 return scoped_ptr<policy::DeviceLocalAccount>();
234 } 234 }
235 235
236 } // namespace 236 } // namespace
237 237
238 namespace policy { 238 namespace policy {
239 239
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 533
534 scoped_ptr<DeviceLocalAccount> 534 scoped_ptr<DeviceLocalAccount>
535 DeviceStatusCollector::GetAutoLaunchedKioskSessionInfo() { 535 DeviceStatusCollector::GetAutoLaunchedKioskSessionInfo() {
536 scoped_ptr<DeviceLocalAccount> account = 536 scoped_ptr<DeviceLocalAccount> account =
537 GetCurrentKioskDeviceLocalAccount(cros_settings_); 537 GetCurrentKioskDeviceLocalAccount(cros_settings_);
538 if (account) { 538 if (account) {
539 chromeos::KioskAppManager::App current_app; 539 chromeos::KioskAppManager::App current_app;
540 if (chromeos::KioskAppManager::Get()->GetApp(account->kiosk_app_id, 540 if (chromeos::KioskAppManager::Get()->GetApp(account->kiosk_app_id,
541 &current_app) && 541 &current_app) &&
542 current_app.was_auto_launched_with_zero_delay) { 542 current_app.was_auto_launched_with_zero_delay) {
543 return account.Pass(); 543 return account;
544 } 544 }
545 } 545 }
546 // No auto-launched kiosk session active. 546 // No auto-launched kiosk session active.
547 return scoped_ptr<DeviceLocalAccount>(); 547 return scoped_ptr<DeviceLocalAccount>();
548 } 548 }
549 549
550 void DeviceStatusCollector::SampleHardwareStatus() { 550 void DeviceStatusCollector::SampleHardwareStatus() {
551 // If hardware reporting has been disabled, do nothing here. 551 // If hardware reporting has been disabled, do nothing here.
552 if (!report_hardware_status_) 552 if (!report_hardware_status_)
553 return; 553 return;
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 ScheduleGeolocationUpdateRequest(); 1049 ScheduleGeolocationUpdateRequest();
1050 } 1050 }
1051 1051
1052 void DeviceStatusCollector::ReceiveVolumeInfo( 1052 void DeviceStatusCollector::ReceiveVolumeInfo(
1053 const std::vector<em::VolumeInfo>& info) { 1053 const std::vector<em::VolumeInfo>& info) {
1054 if (report_hardware_status_) 1054 if (report_hardware_status_)
1055 volume_info_ = info; 1055 volume_info_ = info;
1056 } 1056 }
1057 1057
1058 } // namespace policy 1058 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698