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

Side by Side Diff: chrome/browser/chromeos/ownership/owner_settings_service_chromeos.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 unified diff | Download patch
OLDNEW
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/ownership/owner_settings_service_chromeos.h" 5 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h"
6 6
7 #include <keyhi.h> 7 #include <keyhi.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 714
715 LOG(FATAL) << "Device setting " << path << " is read-only."; 715 LOG(FATAL) << "Device setting " << path << " is read-only.";
716 } 716 }
717 } 717 }
718 718
719 void OwnerSettingsServiceChromeOS::OnPostKeypairLoadedActions() { 719 void OwnerSettingsServiceChromeOS::OnPostKeypairLoadedActions() {
720 DCHECK(thread_checker_.CalledOnValidThread()); 720 DCHECK(thread_checker_.CalledOnValidThread());
721 721
722 const user_manager::User* user = 722 const user_manager::User* user =
723 ProfileHelper::Get()->GetUserByProfile(profile_); 723 ProfileHelper::Get()->GetUserByProfile(profile_);
724 user_id_ = user ? user->GetUserID() : std::string(); 724 user_id_ = user ? user->GetAccountId().GetUserEmail() : std::string();
725 725
726 const bool is_owner = IsOwner() || IsOwnerInTests(user_id_); 726 const bool is_owner = IsOwner() || IsOwnerInTests(user_id_);
727 if (is_owner && device_settings_service_) 727 if (is_owner && device_settings_service_)
728 device_settings_service_->InitOwner(user_id_, weak_factory_.GetWeakPtr()); 728 device_settings_service_->InitOwner(user_id_, weak_factory_.GetWeakPtr());
729 729
730 has_pending_fixups_ = true; 730 has_pending_fixups_ = true;
731 } 731 }
732 732
733 void OwnerSettingsServiceChromeOS::ReloadKeypairImpl(const base::Callback< 733 void OwnerSettingsServiceChromeOS::ReloadKeypairImpl(const base::Callback<
734 void(const scoped_refptr<PublicKey>& public_key, 734 void(const scoped_refptr<PublicKey>& public_key,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 std::vector<OnManagementSettingsSetCallback> callbacks; 814 std::vector<OnManagementSettingsSetCallback> callbacks;
815 pending_management_settings_callbacks_.swap(callbacks); 815 pending_management_settings_callbacks_.swap(callbacks);
816 for (const auto& callback : callbacks) { 816 for (const auto& callback : callbacks) {
817 if (!callback.is_null()) 817 if (!callback.is_null())
818 callback.Run(success); 818 callback.Run(success);
819 } 819 }
820 StorePendingChanges(); 820 StorePendingChanges();
821 } 821 }
822 822
823 } // namespace chromeos 823 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698