Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(914)

Unified Diff: chrome/browser/chromeos/login/signin/token_handle_fetcher.h

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Update after review. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/signin/token_handle_fetcher.h
diff --git a/chrome/browser/chromeos/login/signin/token_handle_fetcher.h b/chrome/browser/chromeos/login/signin/token_handle_fetcher.h
index 5c471a4384c3319c91feafc318da4a1134c88bd9..bd5e9e5583145146bd4445d5243289f34fa158fb 100644
--- a/chrome/browser/chromeos/login/signin/token_handle_fetcher.h
+++ b/chrome/browser/chromeos/login/signin/token_handle_fetcher.h
@@ -13,7 +13,7 @@
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "components/keyed_service/core/keyed_service_shutdown_notifier.h"
-#include "components/user_manager/user_id.h"
+#include "components/signin/core/account_id/account_id.h"
#include "google_apis/gaia/gaia_oauth_client.h"
#include "google_apis/gaia/oauth2_token_service.h"
@@ -29,11 +29,10 @@ class TokenHandleFetcher : public gaia::GaiaOAuthClient::Delegate,
public OAuth2TokenService::Consumer,
public OAuth2TokenService::Observer {
public:
- TokenHandleFetcher(TokenHandleUtil* util,
- const user_manager::UserID& user_id);
+ TokenHandleFetcher(TokenHandleUtil* util, const AccountId& account_id);
~TokenHandleFetcher() override;
- typedef base::Callback<void(const user_manager::UserID&, bool success)>
+ typedef base::Callback<void(const AccountId&, bool success)>
achuithb 2015/10/28 23:11:45 using
Alexander Alekseev 2015/10/29 02:00:40 Done.
TokenFetchingCallback;
// Get token handle for user who have just signed in via GAIA. This
@@ -46,7 +45,7 @@ class TokenHandleFetcher : public gaia::GaiaOAuthClient::Delegate,
private:
// OAuth2TokenService::Observer override:
- void OnRefreshTokenAvailable(const std::string& account_id) override;
+ void OnRefreshTokenAvailable(const std::string& user_email) override;
// OAuth2TokenService::Consumer overrides:
void OnGetTokenSuccess(const OAuth2TokenService::Request* request,
@@ -61,20 +60,20 @@ class TokenHandleFetcher : public gaia::GaiaOAuthClient::Delegate,
void OnGetTokenInfoResponse(
scoped_ptr<base::DictionaryValue> token_info) override;
- void RequestAccessToken(const std::string& account_id);
+ void RequestAccessToken(const std::string& user_email);
void FillForAccessToken(const std::string& access_token);
// This is called before profile is detroyed.
void OnProfileDestroyed();
- TokenHandleUtil* token_handle_util_;
- user_manager::UserID user_id_;
- OAuth2TokenService* token_service_;
+ TokenHandleUtil* token_handle_util_ = nullptr;
+ AccountId account_id_;
+ OAuth2TokenService* token_service_ = nullptr;
- bool waiting_for_refresh_token_;
+ bool waiting_for_refresh_token_ = false;
std::string account_without_token_;
- Profile* profile_;
- base::TimeTicks tokeninfo_response_start_time_;
+ Profile* profile_ = nullptr;
+ base::TimeTicks tokeninfo_response_start_time_ = base::TimeTicks();
TokenFetchingCallback callback_;
scoped_ptr<gaia::GaiaOAuthClient> gaia_client_;
scoped_ptr<OAuth2TokenService::Request> oauth2_access_token_request_;

Powered by Google App Engine
This is Rietveld 408576698