| Index: chrome/browser/signin/chrome_signin_client.cc
|
| diff --git a/chrome/browser/signin/chrome_signin_client.cc b/chrome/browser/signin/chrome_signin_client.cc
|
| index ba280aa1d911d69baab3f5f0094864b39173467f..69959906c20968022e4bcb1ac7d4a047e1829391 100644
|
| --- a/chrome/browser/signin/chrome_signin_client.cc
|
| +++ b/chrome/browser/signin/chrome_signin_client.cc
|
| @@ -39,6 +39,7 @@
|
| #if defined(OS_CHROMEOS)
|
| #include "chrome/browser/chromeos/net/delay_network_call.h"
|
| #include "chrome/browser/chromeos/profiles/profile_helper.h"
|
| +#include "components/user_manager/known_user.h"
|
| #include "components/user_manager/user_manager.h"
|
| #endif
|
|
|
| @@ -63,20 +64,19 @@ ChromeSigninClient::ChromeSigninClient(
|
| chromeos::ProfileHelper::Get()->GetUserByProfile(profile_);
|
| if (!user)
|
| return;
|
| - auto* user_manager = user_manager::UserManager::Get();
|
| const AccountId account_id = user->GetAccountId();
|
| - if (user_manager->GetKnownUserDeviceId(account_id).empty()) {
|
| + if (user_manager::known_user::GetDeviceId(account_id).empty()) {
|
| const std::string legacy_device_id =
|
| GetPrefs()->GetString(prefs::kGoogleServicesSigninScopedDeviceId);
|
| if (!legacy_device_id.empty()) {
|
| // Need to move device ID from the old location to the new one, if it has
|
| // not been done yet.
|
| - user_manager->SetKnownUserDeviceId(account_id, legacy_device_id);
|
| + user_manager::known_user::SetDeviceId(account_id, legacy_device_id);
|
| } else {
|
| - user_manager->SetKnownUserDeviceId(
|
| - account_id,
|
| - GenerateSigninScopedDeviceID(
|
| - user_manager->IsUserNonCryptohomeDataEphemeral(account_id)));
|
| + user_manager::known_user::SetDeviceId(
|
| + account_id, GenerateSigninScopedDeviceID(
|
| + user_manager::UserManager::Get()
|
| + ->IsUserNonCryptohomeDataEphemeral(account_id)));
|
| }
|
| }
|
| GetPrefs()->SetString(prefs::kGoogleServicesSigninScopedDeviceId,
|
| @@ -154,8 +154,7 @@ std::string ChromeSigninClient::GetSigninScopedDeviceId() {
|
| return std::string();
|
|
|
| const std::string signin_scoped_device_id =
|
| - user_manager::UserManager::Get()->GetKnownUserDeviceId(
|
| - user->GetAccountId());
|
| + user_manager::known_user::GetDeviceId(user->GetAccountId());
|
| LOG_IF(ERROR, signin_scoped_device_id.empty())
|
| << "Device ID is not set for user.";
|
| return signin_scoped_device_id;
|
|
|