Index: chrome/browser/chromeos/login/signin/token_handle_util.cc |
diff --git a/chrome/browser/chromeos/login/signin/token_handle_util.cc b/chrome/browser/chromeos/login/signin/token_handle_util.cc |
index 4e688a747cf7e6da7bfd3aa19760e65547f027ef..3bd4574c898ad5104f71de412bfb435e21cfec91 100644 |
--- a/chrome/browser/chromeos/login/signin/token_handle_util.cc |
+++ b/chrome/browser/chromeos/login/signin/token_handle_util.cc |
@@ -9,7 +9,6 @@ |
#include "base/values.h" |
#include "chrome/browser/chromeos/profiles/profile_helper.h" |
#include "chrome/browser/profiles/profile.h" |
-#include "components/user_manager/user_id.h" |
#include "components/user_manager/user_manager.h" |
#include "google_apis/gaia/gaia_oauth_client.h" |
@@ -35,7 +34,7 @@ TokenHandleUtil::~TokenHandleUtil() { |
gaia_client_.reset(); |
} |
-bool TokenHandleUtil::HasToken(const user_manager::UserID& user_id) { |
+bool TokenHandleUtil::HasToken(const AccountId& user_id) { |
achuithb
2015/10/23 00:08:50
account_id here and below
Alexander Alekseev
2015/10/23 09:11:22
Done.
|
const base::DictionaryValue* dict = nullptr; |
std::string token; |
if (!user_manager_->FindKnownUserPrefs(user_id, &dict)) |
@@ -45,7 +44,7 @@ bool TokenHandleUtil::HasToken(const user_manager::UserID& user_id) { |
return !token.empty(); |
} |
-bool TokenHandleUtil::ShouldObtainHandle(const user_manager::UserID& user_id) { |
+bool TokenHandleUtil::ShouldObtainHandle(const AccountId& user_id) { |
const base::DictionaryValue* dict = nullptr; |
std::string token; |
if (!user_manager_->FindKnownUserPrefs(user_id, &dict)) |
@@ -59,7 +58,7 @@ bool TokenHandleUtil::ShouldObtainHandle(const user_manager::UserID& user_id) { |
return kHandleStatusInvalid == status; |
} |
-void TokenHandleUtil::DeleteHandle(const user_manager::UserID& user_id) { |
+void TokenHandleUtil::DeleteHandle(const AccountId& user_id) { |
const base::DictionaryValue* dict = nullptr; |
if (!user_manager_->FindKnownUserPrefs(user_id, &dict)) |
return; |
@@ -70,12 +69,12 @@ void TokenHandleUtil::DeleteHandle(const user_manager::UserID& user_id) { |
/* replace values */ true); |
} |
-void TokenHandleUtil::MarkHandleInvalid(const user_manager::UserID& user_id) { |
+void TokenHandleUtil::MarkHandleInvalid(const AccountId& user_id) { |
user_manager_->SetKnownUserStringPref(user_id, kTokenHandleStatusPref, |
kHandleStatusInvalid); |
} |
-void TokenHandleUtil::CheckToken(const user_manager::UserID& user_id, |
+void TokenHandleUtil::CheckToken(const AccountId& user_id, |
const TokenValidationCallback& callback) { |
const base::DictionaryValue* dict = nullptr; |
std::string token; |
@@ -101,7 +100,7 @@ void TokenHandleUtil::CheckToken(const user_manager::UserID& user_id, |
validation_delegates_.get(token)); |
} |
-void TokenHandleUtil::StoreTokenHandle(const user_manager::UserID& user_id, |
+void TokenHandleUtil::StoreTokenHandle(const AccountId& user_id, |
const std::string& handle) { |
user_manager_->SetKnownUserStringPref(user_id, kTokenHandlePref, handle); |
user_manager_->SetKnownUserStringPref(user_id, kTokenHandleStatusPref, |
@@ -112,22 +111,20 @@ void TokenHandleUtil::OnValidationComplete(const std::string& token) { |
validation_delegates_.erase(token); |
} |
-void TokenHandleUtil::OnObtainTokenComplete( |
- const user_manager::UserID& user_id) { |
+void TokenHandleUtil::OnObtainTokenComplete(const AccountId& user_id) { |
obtain_delegates_.erase(user_id); |
} |
TokenHandleUtil::TokenDelegate::TokenDelegate( |
const base::WeakPtr<TokenHandleUtil>& owner, |
- const user_manager::UserID& user_id, |
+ const AccountId& user_id, |
const std::string& token, |
const TokenValidationCallback& callback) |
: owner_(owner), |
user_id_(user_id), |
token_(token), |
tokeninfo_response_start_time_(base::TimeTicks::Now()), |
- callback_(callback) { |
-} |
+ callback_(callback) {} |
TokenHandleUtil::TokenDelegate::~TokenDelegate() { |
} |