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

Side by Side Diff: remoting/host/setup/oauth_client.h

Issue 354693004: Switch to using URLRequestContextBuilder to create some URLRequestContexts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_OAUTH_CLIENT 5 #ifndef REMOTING_HOST_SETUP_OAUTH_CLIENT
6 #define REMOTING_HOST_SETUP_OAUTH_CLIENT 6 #define REMOTING_HOST_SETUP_OAUTH_CLIENT
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/ref_counted.h"
12 #include "google_apis/gaia/gaia_oauth_client.h" 13 #include "google_apis/gaia/gaia_oauth_client.h"
13 #include "remoting/base/url_request_context.h" 14 #include "net/url_request/url_request_context_getter.h"
15
16 namespace net {
17 class URLRequestContext;
18 }
14 19
15 namespace remoting { 20 namespace remoting {
16 21
17 // A wrapper around GaiaOAuthClient that provides a more convenient interface, 22 // A wrapper around GaiaOAuthClient that provides a more convenient interface,
18 // with queueing of requests and a callback rather than a delegate. 23 // with queueing of requests and a callback rather than a delegate.
19 class OAuthClient : public gaia::GaiaOAuthClient::Delegate { 24 class OAuthClient : public gaia::GaiaOAuthClient::Delegate {
20 public: 25 public:
21 // Called when GetCredentialsFromAuthCode is completed, with the |user_email| 26 // Called when GetCredentialsFromAuthCode is completed, with the |user_email|
22 // and |refresh_token| that correspond to the given |auth_code|, or with empty 27 // and |refresh_token| that correspond to the given |auth_code|, or with empty
23 // strings on error. 28 // strings on error.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 gaia::GaiaOAuthClient gaia_oauth_client_; 75 gaia::GaiaOAuthClient gaia_oauth_client_;
71 std::string refresh_token_; 76 std::string refresh_token_;
72 CompletionCallback on_done_; 77 CompletionCallback on_done_;
73 78
74 DISALLOW_COPY_AND_ASSIGN(OAuthClient); 79 DISALLOW_COPY_AND_ASSIGN(OAuthClient);
75 }; 80 };
76 81
77 } // namespace remoting 82 } // namespace remoting
78 83
79 #endif // REMOTING_HOST_SETUP_OAUTH_CLIENT 84 #endif // REMOTING_HOST_SETUP_OAUTH_CLIENT
OLDNEW
« no previous file with comments | « remoting/host/setup/me2me_native_messaging_host_main.cc ('k') | remoting/host/setup/oauth_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698