Chromium Code Reviews| Index: remoting/host/oauth_token_getter.h |
| diff --git a/remoting/host/oauth_token_getter.h b/remoting/host/oauth_token_getter.h |
| index 4b48a4e68c35cc342875eb63f79dee907cd36020..99a289ccecf5e6e080205246c4f7c63558a2e00c 100644 |
| --- a/remoting/host/oauth_token_getter.h |
| +++ b/remoting/host/oauth_token_getter.h |
| @@ -10,6 +10,8 @@ |
| #include "base/basictypes.h" |
| #include "base/callback.h" |
| #include "base/threading/non_thread_safe.h" |
| +#include "base/time/time.h" |
| +#include "base/timer/timer.h" |
| #include "google_apis/gaia/gaia_oauth_client.h" |
| namespace net { |
| @@ -56,9 +58,12 @@ class OAuthTokenGetter : |
| OAuthTokenGetter( |
| scoped_ptr<OAuthCredentials> oauth_credentials, |
| - scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); |
| + scoped_refptr<net::URLRequestContextGetter> url_request_context_getter, |
| + bool auto_refresh); |
|
Sergey Ulanov
2014/05/19 22:33:46
Why do we need both this flag and EnableAutoRefres
rmsousa
2014/05/19 22:46:53
I forgot to delete EnableAutoRefresh() from here (
|
| virtual ~OAuthTokenGetter(); |
| + void EnableAutoRefresh(bool enabled); |
| + |
| // Call |on_access_token| with an access token, or the failure status. |
| void CallWithToken(const OAuthTokenGetter::TokenCallback& on_access_token); |
| @@ -84,8 +89,10 @@ class OAuthTokenGetter : |
| bool refreshing_oauth_token_; |
| std::string oauth_access_token_; |
| + std::string verified_email_; |
| base::Time auth_token_expiry_time_; |
| std::queue<OAuthTokenGetter::TokenCallback> pending_callbacks_; |
| + scoped_ptr<base::OneShotTimer<OAuthTokenGetter> > refresh_timer_; |
| DISALLOW_COPY_AND_ASSIGN(OAuthTokenGetter); |
| }; |