| 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/oauth_client.h" | 5 #include "remoting/host/setup/oauth_client.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 const int kMaxGaiaRetries = 3; | 10 const int kMaxGaiaRetries = 3; |
| 11 } // namespace | 11 } // namespace |
| 12 | 12 |
| 13 namespace remoting { | 13 namespace remoting { |
| 14 | 14 |
| 15 OAuthClient::OAuthClient( | 15 OAuthClient::OAuthClient( |
| 16 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter) | 16 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter) |
| 17 : gaia_oauth_client_(url_request_context_getter) { | 17 : gaia_oauth_client_(url_request_context_getter.get()) { |
| 18 } | 18 } |
| 19 | 19 |
| 20 OAuthClient::~OAuthClient() { | 20 OAuthClient::~OAuthClient() { |
| 21 } | 21 } |
| 22 | 22 |
| 23 void OAuthClient::GetCredentialsFromAuthCode( | 23 void OAuthClient::GetCredentialsFromAuthCode( |
| 24 const gaia::OAuthClientInfo& oauth_client_info, | 24 const gaia::OAuthClientInfo& oauth_client_info, |
| 25 const std::string& auth_code, | 25 const std::string& auth_code, |
| 26 CompletionCallback on_done) { | 26 CompletionCallback on_done) { |
| 27 | 27 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 CompletionCallback on_done) { | 86 CompletionCallback on_done) { |
| 87 this->oauth_client_info = oauth_client_info; | 87 this->oauth_client_info = oauth_client_info; |
| 88 this->auth_code = auth_code; | 88 this->auth_code = auth_code; |
| 89 this->on_done = on_done; | 89 this->on_done = on_done; |
| 90 } | 90 } |
| 91 | 91 |
| 92 OAuthClient::Request::~Request() { | 92 OAuthClient::Request::~Request() { |
| 93 } | 93 } |
| 94 | 94 |
| 95 } // namespace remoting | 95 } // namespace remoting |
| OLD | NEW |