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 #include "remoting/host/setup/gaia_oauth_client.h" | 5 #include "remoting/base/gaia_oauth_client.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 | 9 |
10 namespace { | 10 namespace { |
11 const int kMaxGaiaRetries = 3; | 11 const int kMaxGaiaRetries = 3; |
12 } // namespace | 12 } // namespace |
13 | 13 |
14 namespace remoting { | 14 namespace remoting { |
15 | 15 |
16 GaiaOAuthClient::GaiaOAuthClient( | 16 GaiaOAuthClient::GaiaOAuthClient( |
17 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter) | 17 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter) |
18 : gaia_oauth_client_(url_request_context_getter.get()) { | 18 : gaia_oauth_client_(url_request_context_getter.get()) {} |
nicholss
2017/01/31 16:44:58
git cl format did these changes.
| |
19 } | |
20 | 19 |
21 GaiaOAuthClient::~GaiaOAuthClient() { | 20 GaiaOAuthClient::~GaiaOAuthClient() {} |
22 } | |
23 | 21 |
24 void GaiaOAuthClient::GetCredentialsFromAuthCode( | 22 void GaiaOAuthClient::GetCredentialsFromAuthCode( |
25 const gaia::OAuthClientInfo& oauth_client_info, | 23 const gaia::OAuthClientInfo& oauth_client_info, |
26 const std::string& auth_code, | 24 const std::string& auth_code, |
27 bool need_user_email, | 25 bool need_user_email, |
28 CompletionCallback on_done) { | 26 CompletionCallback on_done) { |
29 if (!on_done_.is_null()) { | 27 if (!on_done_.is_null()) { |
30 pending_requests_.push( | 28 pending_requests_.push( |
31 Request(oauth_client_info, auth_code, need_user_email, on_done)); | 29 Request(oauth_client_info, auth_code, need_user_email, on_done)); |
32 return; | 30 return; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 bool need_user_email, | 87 bool need_user_email, |
90 CompletionCallback on_done) { | 88 CompletionCallback on_done) { |
91 this->oauth_client_info = oauth_client_info; | 89 this->oauth_client_info = oauth_client_info; |
92 this->auth_code = auth_code; | 90 this->auth_code = auth_code; |
93 this->need_user_email = need_user_email; | 91 this->need_user_email = need_user_email; |
94 this->on_done = on_done; | 92 this->on_done = on_done; |
95 } | 93 } |
96 | 94 |
97 GaiaOAuthClient::Request::Request(const Request& other) = default; | 95 GaiaOAuthClient::Request::Request(const Request& other) = default; |
98 | 96 |
99 GaiaOAuthClient::Request::~Request() { | 97 GaiaOAuthClient::Request::~Request() {} |
100 } | |
101 | 98 |
102 } // namespace remoting | 99 } // namespace remoting |
OLD | NEW |