| 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 910e4a03b41032b0a7c0f7ed6661080bac4e0809..e267be60c643d10a2a9223dc475cedb482d3212c 100644
|
| --- a/chrome/browser/chromeos/login/signin/token_handle_util.cc
|
| +++ b/chrome/browser/chromeos/login/signin/token_handle_util.cc
|
| @@ -74,17 +74,17 @@ void TokenHandleUtil::MarkHandleInvalid(const user_manager::UserID& user_id) {
|
| kHandleStatusInvalid);
|
| }
|
|
|
| -void TokenHandleUtil::CheckToken(const user_manager::UserID& user_id,
|
| +bool TokenHandleUtil::CheckToken(const user_manager::UserID& user_id,
|
| const TokenValidationCallback& callback) {
|
| const base::DictionaryValue* dict = nullptr;
|
| std::string token;
|
| if (!user_manager_->FindKnownUserPrefs(user_id, &dict)) {
|
| callback.Run(user_id, UNKNOWN);
|
| - return;
|
| + return true;
|
| }
|
| if (!dict->GetString(kTokenHandlePref, &token)) {
|
| callback.Run(user_id, UNKNOWN);
|
| - return;
|
| + return true;
|
| }
|
|
|
| if (!gaia_client_.get()) {
|
| @@ -92,6 +92,8 @@ void TokenHandleUtil::CheckToken(const user_manager::UserID& user_id,
|
| chromeos::ProfileHelper::Get()->GetSigninProfile()->GetRequestContext();
|
| gaia_client_.reset(new gaia::GaiaOAuthClient(request_context));
|
| }
|
| + if (validation_delegates_.count(token) != 0)
|
| + return false;
|
|
|
| validation_delegates_.set(
|
| token, scoped_ptr<TokenDelegate>(new TokenDelegate(
|
| @@ -99,6 +101,7 @@ void TokenHandleUtil::CheckToken(const user_manager::UserID& user_id,
|
| token, callback)));
|
| gaia_client_->GetTokenHandleInfo(token, kMaxRetries,
|
| validation_delegates_.get(token));
|
| + return true;
|
| }
|
|
|
| void TokenHandleUtil::StoreTokenHandle(const user_manager::UserID& user_id,
|
|
|