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

Unified Diff: blimp/client/core/session/identity_source.h

Issue 2406403003: Clean up Assignment Create in BlimpClientContextImpl. (Closed)
Patch Set: Addresses dtrainor's #8 comments. Created 4 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: blimp/client/core/session/identity_source.h
diff --git a/blimp/client/core/session/identity_source.h b/blimp/client/core/session/identity_source.h
index 30663102f5a05dc9fd066e93921a531ee97c4055..c3508d7224566e00f13ad3d87272ef97385012c9 100644
--- a/blimp/client/core/session/identity_source.h
+++ b/blimp/client/core/session/identity_source.h
@@ -23,9 +23,12 @@ class IdentitySource : public OAuth2TokenService::Consumer,
public OAuth2TokenService::Observer,
public IdentityProvider::Observer {
public:
- typedef base::Callback<void(const std::string&)> TokenCallback;
+ using TokenCallback = base::Callback<void(const std::string&)>;
+ using TokenErrorCallback =
+ base::Callback<void(const GoogleServiceAuthError&)>;
- explicit IdentitySource(BlimpClientContextDelegate* delegate,
+ explicit IdentitySource(std::unique_ptr<IdentityProvider> identity_provider,
+ TokenErrorCallback error_callback,
David Trainor- moved to gerrit 2016/10/25 03:14:27 const &?
CJ 2016/10/25 20:38:01 Done.
const TokenCallback& callback);
~IdentitySource() override;
@@ -63,6 +66,8 @@ class IdentitySource : public OAuth2TokenService::Consumer,
// OAuth2TokenService::Consumer callback get called.
std::unique_ptr<OAuth2TokenService::Request> token_request_;
+ TokenErrorCallback error_callback_;
+
// Callback after OAuth2 token is fetched.
TokenCallback token_callback_;
@@ -76,8 +81,6 @@ class IdentitySource : public OAuth2TokenService::Consumer,
// Current retry count due to request cancellation.
int retry_times_;
- BlimpClientContextDelegate* delegate_;
-
DISALLOW_COPY_AND_ASSIGN(IdentitySource);
};

Powered by Google App Engine
This is Rietveld 408576698