Chromium Code Reviews| 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); |
| }; |