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/login/users/chrome_user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <cstddef> | 8 #include <cstddef> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 | 599 |
600 void ChromeUserManagerImpl::PerformPostUserLoggedInActions( | 600 void ChromeUserManagerImpl::PerformPostUserLoggedInActions( |
601 bool browser_restart) { | 601 bool browser_restart) { |
602 // Initialize the session length limiter and start it only if | 602 // Initialize the session length limiter and start it only if |
603 // session limit is defined by the policy. | 603 // session limit is defined by the policy. |
604 session_length_limiter_.reset( | 604 session_length_limiter_.reset( |
605 new SessionLengthLimiter(NULL, browser_restart)); | 605 new SessionLengthLimiter(NULL, browser_restart)); |
606 } | 606 } |
607 | 607 |
608 bool ChromeUserManagerImpl::IsDemoApp(const AccountId& account_id) const { | 608 bool ChromeUserManagerImpl::IsDemoApp(const AccountId& account_id) const { |
609 return DemoAppLauncher::IsDemoAppSession(account_id.GetUserEmail()); | 609 return DemoAppLauncher::IsDemoAppSession(account_id); |
610 } | 610 } |
611 | 611 |
612 bool ChromeUserManagerImpl::IsKioskApp(const AccountId& account_id) const { | 612 bool ChromeUserManagerImpl::IsKioskApp(const AccountId& account_id) const { |
613 policy::DeviceLocalAccount::Type device_local_account_type; | 613 policy::DeviceLocalAccount::Type device_local_account_type; |
614 return policy::IsDeviceLocalAccountUser(account_id.GetUserEmail(), | 614 return policy::IsDeviceLocalAccountUser(account_id.GetUserEmail(), |
615 &device_local_account_type) && | 615 &device_local_account_type) && |
616 device_local_account_type == | 616 device_local_account_type == |
617 policy::DeviceLocalAccount::TYPE_KIOSK_APP; | 617 policy::DeviceLocalAccount::TYPE_KIOSK_APP; |
618 } | 618 } |
619 | 619 |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1244 } | 1244 } |
1245 | 1245 |
1246 bool ChromeUserManagerImpl::IsFirstExecAfterBoot() const { | 1246 bool ChromeUserManagerImpl::IsFirstExecAfterBoot() const { |
1247 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1247 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
1248 chromeos::switches::kFirstExecAfterBoot); | 1248 chromeos::switches::kFirstExecAfterBoot); |
1249 } | 1249 } |
1250 | 1250 |
1251 void ChromeUserManagerImpl::AsyncRemoveCryptohome( | 1251 void ChromeUserManagerImpl::AsyncRemoveCryptohome( |
1252 const AccountId& account_id) const { | 1252 const AccountId& account_id) const { |
1253 cryptohome::AsyncMethodCaller::GetInstance()->AsyncRemove( | 1253 cryptohome::AsyncMethodCaller::GetInstance()->AsyncRemove( |
1254 account_id.GetUserEmail(), base::Bind(&OnRemoveUserComplete, account_id)); | 1254 cryptohome::Identification(account_id), |
| 1255 base::Bind(&OnRemoveUserComplete, account_id)); |
1255 } | 1256 } |
1256 | 1257 |
1257 bool ChromeUserManagerImpl::IsGuestAccountId( | 1258 bool ChromeUserManagerImpl::IsGuestAccountId( |
1258 const AccountId& account_id) const { | 1259 const AccountId& account_id) const { |
1259 return account_id == login::GuestAccountId(); | 1260 return account_id == login::GuestAccountId(); |
1260 } | 1261 } |
1261 | 1262 |
1262 bool ChromeUserManagerImpl::IsStubAccountId(const AccountId& account_id) const { | 1263 bool ChromeUserManagerImpl::IsStubAccountId(const AccountId& account_id) const { |
1263 return account_id == login::StubAccountId(); | 1264 return account_id == login::StubAccountId(); |
1264 } | 1265 } |
(...skipping 29 matching lines...) Expand all Loading... |
1294 base::Bind(ResolveLocale, locale, base::Unretained(out_resolved_locale)), | 1295 base::Bind(ResolveLocale, locale, base::Unretained(out_resolved_locale)), |
1295 on_resolved_callback); | 1296 on_resolved_callback); |
1296 } | 1297 } |
1297 | 1298 |
1298 bool ChromeUserManagerImpl::IsValidDefaultUserImageId(int image_index) const { | 1299 bool ChromeUserManagerImpl::IsValidDefaultUserImageId(int image_index) const { |
1299 return image_index >= 0 && | 1300 return image_index >= 0 && |
1300 image_index < chromeos::default_user_image::kDefaultImagesCount; | 1301 image_index < chromeos::default_user_image::kDefaultImagesCount; |
1301 } | 1302 } |
1302 | 1303 |
1303 } // namespace chromeos | 1304 } // namespace chromeos |
OLD | NEW |