| 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..1d954ff88058cc9a89b71cac963b86a107587b69 100644
|
| --- a/chrome/browser/chromeos/login/signin/token_handle_util.cc
|
| +++ b/chrome/browser/chromeos/login/signin/token_handle_util.cc
|
| @@ -75,17 +75,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()) {
|
| @@ -93,12 +93,15 @@ 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(
|
| weak_factory_.GetWeakPtr(), user_id, token, callback)));
|
| gaia_client_->GetTokenHandleInfo(token, kMaxRetries,
|
| validation_delegates_.get(token));
|
| + return true;
|
| }
|
|
|
| void TokenHandleUtil::StoreTokenHandle(const user_manager::UserID& user_id,
|
|
|