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

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

Issue 2406403003: Clean up Assignment Create in BlimpClientContextImpl. (Closed)
Patch Set: Addresses dtrainor's #14 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..d86a0a450c1613a59ccf0e1d299154dd9b4242b6 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,
+ const TokenErrorCallback& error_callback,
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);
};
« no previous file with comments | « blimp/client/core/context/blimp_client_context_impl.cc ('k') | blimp/client/core/session/identity_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698