| Index: chrome/browser/chromeos/login/signin/token_handle_util.h
|
| diff --git a/chrome/browser/chromeos/login/signin/token_handle_util.h b/chrome/browser/chromeos/login/signin/token_handle_util.h
|
| index 20ef09025765125a08683252c72a83635d0ef81e..572d33450033f61cdff45b44dcc614084c76782b 100644
|
| --- a/chrome/browser/chromeos/login/signin/token_handle_util.h
|
| +++ b/chrome/browser/chromeos/login/signin/token_handle_util.h
|
| @@ -12,10 +12,8 @@
|
| #include "base/containers/scoped_ptr_hash_map.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/time/time.h"
|
| -#include "components/signin/core/account_id/account_id.h"
|
| +#include "components/user_manager/user_id.h"
|
| #include "google_apis/gaia/gaia_oauth_client.h"
|
| -
|
| -class AccountId;
|
|
|
| namespace base {
|
| class DictionaryValue;
|
| @@ -36,36 +34,37 @@
|
|
|
| enum TokenHandleStatus { VALID, INVALID, UNKNOWN };
|
|
|
| - using TokenValidationCallback =
|
| - base::Callback<void(const AccountId&, TokenHandleStatus)>;
|
| + typedef base::Callback<void(const user_manager::UserID&, TokenHandleStatus)>
|
| + TokenValidationCallback;
|
|
|
| - // Returns true if UserManager has token handle associated with |account_id|.
|
| - bool HasToken(const AccountId& account_id);
|
| + // Returns true if UserManager has token handle associated with |user_id|.
|
| + bool HasToken(const user_manager::UserID& user_id);
|
|
|
| - // Removes token handle for |account_id| from UserManager storage.
|
| - void DeleteHandle(const AccountId& account_id);
|
| + // Removes token handle for |user_id| from UserManager storage.
|
| + void DeleteHandle(const user_manager::UserID& user_id);
|
|
|
| // Marks current handle as invalid, new one should be obtained at next sign
|
| // in.
|
| - void MarkHandleInvalid(const AccountId& account_id);
|
| + void MarkHandleInvalid(const user_manager::UserID& user_id);
|
|
|
| - // Indicates if token handle for |account_id| is missing or marked as invalid.
|
| - bool ShouldObtainHandle(const AccountId& account_id);
|
| + // Indicates if token handle for |user_id| is missing or marked as invalid.
|
| + bool ShouldObtainHandle(const user_manager::UserID& user_id);
|
|
|
| - // Performs token handle check for |account_id|. Will call |callback| with
|
| + // Performs token handle check for |user_id|. Will call |callback| with
|
| // corresponding result.
|
| - void CheckToken(const AccountId& account_id,
|
| + void CheckToken(const user_manager::UserID& user_id,
|
| const TokenValidationCallback& callback);
|
|
|
| - // Given the token |handle| store it for |account_id|.
|
| - void StoreTokenHandle(const AccountId& account_id, const std::string& handle);
|
| + // Given the token |handle| store it for |user_id|.
|
| + void StoreTokenHandle(const user_manager::UserID& user_id,
|
| + const std::string& handle);
|
|
|
| private:
|
| // Associates GaiaOAuthClient::Delegate with User ID and Token.
|
| class TokenDelegate : public gaia::GaiaOAuthClient::Delegate {
|
| public:
|
| TokenDelegate(const base::WeakPtr<TokenHandleUtil>& owner,
|
| - const AccountId& account_id,
|
| + const user_manager::UserID& user_id,
|
| const std::string& token,
|
| const TokenValidationCallback& callback);
|
| ~TokenDelegate() override;
|
| @@ -77,7 +76,7 @@
|
|
|
| private:
|
| base::WeakPtr<TokenHandleUtil> owner_;
|
| - AccountId account_id_;
|
| + user_manager::UserID user_id_;
|
| std::string token_;
|
| base::TimeTicks tokeninfo_response_start_time_;
|
| TokenValidationCallback callback_;
|
| @@ -86,7 +85,7 @@
|
| };
|
|
|
| void OnValidationComplete(const std::string& token);
|
| - void OnObtainTokenComplete(const AccountId& account_id);
|
| + void OnObtainTokenComplete(const user_manager::UserID& id);
|
|
|
| // UserManager that stores corresponding user data.
|
| user_manager::UserManager* user_manager_;
|
| @@ -96,7 +95,7 @@
|
| validation_delegates_;
|
|
|
| // Map of pending obtain operations.
|
| - base::ScopedPtrHashMap<AccountId, scoped_ptr<TokenDelegate>>
|
| + base::ScopedPtrHashMap<user_manager::UserID, scoped_ptr<TokenDelegate>>
|
| obtain_delegates_;
|
|
|
| // Instance of GAIA Client.
|
|
|