OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_HOST_SETUP_GAIA_OAUTH_CLIENT_H_ | 5 #ifndef REMOTING_HOST_SETUP_GAIA_OAUTH_CLIENT_H_ |
6 #define REMOTING_HOST_SETUP_GAIA_OAUTH_CLIENT_H_ | 6 #define REMOTING_HOST_SETUP_GAIA_OAUTH_CLIENT_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "google_apis/gaia/gaia_oauth_client.h" | 12 #include "google_apis/gaia/gaia_oauth_client.h" |
13 #include "net/url_request/url_request_context_getter.h" | 13 #include "net/url_request/url_request_context_getter.h" |
14 | 14 |
15 #include "remoting/host/setup/oauth_client.h" | 15 #include "remoting/host/setup/oauth_client.h" |
16 | 16 |
17 namespace net { | |
18 class URLRequestContext; | |
19 } | |
20 | |
21 namespace remoting { | 17 namespace remoting { |
22 | 18 |
23 // A wrapper around gaia::GaiaOAuthClient that provides a more | 19 // A wrapper around gaia::GaiaOAuthClient that provides a more |
24 // convenient interface, with queueing of requests and a callback | 20 // convenient interface, with queueing of requests and a callback |
25 // rather than a delegate. | 21 // rather than a delegate. |
26 class GaiaOAuthClient : public OAuthClient, | 22 class GaiaOAuthClient : public OAuthClient, |
27 public gaia::GaiaOAuthClient::Delegate { | 23 public gaia::GaiaOAuthClient::Delegate { |
28 public: | 24 public: |
29 GaiaOAuthClient( | 25 GaiaOAuthClient( |
30 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); | 26 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 std::string refresh_token_; | 72 std::string refresh_token_; |
77 bool need_user_email_; | 73 bool need_user_email_; |
78 CompletionCallback on_done_; | 74 CompletionCallback on_done_; |
79 | 75 |
80 DISALLOW_COPY_AND_ASSIGN(GaiaOAuthClient); | 76 DISALLOW_COPY_AND_ASSIGN(GaiaOAuthClient); |
81 }; | 77 }; |
82 | 78 |
83 } // namespace remoting | 79 } // namespace remoting |
84 | 80 |
85 #endif // REMOTING_HOST_SETUP_GAIA_OAUTH_CLIENT_H_ | 81 #endif // REMOTING_HOST_SETUP_GAIA_OAUTH_CLIENT_H_ |
OLD | NEW |