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

Unified Diff: chrome/browser/chromeos/policy/device_status_collector.cc

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/device_status_collector.cc
diff --git a/chrome/browser/chromeos/policy/device_status_collector.cc b/chrome/browser/chromeos/policy/device_status_collector.cc
index f857846048eb57d56bf3871aadf0e28bfff70a15..fc12d3dd260649c67a7fde35cef6714ad36284cc 100644
--- a/chrome/browser/chromeos/policy/device_status_collector.cc
+++ b/chrome/browser/chromeos/policy/device_status_collector.cc
@@ -216,12 +216,12 @@ GetCurrentKioskDeviceLocalAccount(chromeos::CrosSettings* settings) {
return scoped_ptr<policy::DeviceLocalAccount>();
const user_manager::User* const user =
user_manager::UserManager::Get()->GetActiveUser();
- const std::string user_id = user->GetUserID();
const std::vector<policy::DeviceLocalAccount> accounts =
policy::GetDeviceLocalAccounts(settings);
for (const auto& device_local_account : accounts) {
- if (device_local_account.user_id == user_id) {
+ if (AccountId::FromUserEmail(device_local_account.user_id) ==
+ user->GetAccountId()) {
return make_scoped_ptr(
new policy::DeviceLocalAccount(device_local_account)).Pass();
}

Powered by Google App Engine
This is Rietveld 408576698