| 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);
|
| };
|
|
|
|
|