| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/test/access_token_fetcher.h" | 5 #include "remoting/test/access_token_fetcher.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/callback_helpers.h" | 11 #include "base/callback_helpers.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "base/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
| 15 #include "google_apis/gaia/gaia_constants.h" | 15 #include "google_apis/gaia/gaia_constants.h" |
| 16 #include "google_apis/google_api_keys.h" | 16 #include "google_apis/google_api_keys.h" |
| 17 #include "net/url_request/url_fetcher.h" | 17 #include "net/url_request/url_fetcher.h" |
| 18 #include "remoting/base/url_request_context_getter.h" | 18 #include "remoting/base/url_request_context_getter.h" |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 const int kMaxGetTokensRetries = 3; | 21 const int kMaxGetTokensRetries = 3; |
| 22 const char kOauthRedirectUrl[] = | 22 const char kOauthRedirectUrl[] = |
| 23 "https://chromoting-oauth.talkgadget." | 23 "https://chromoting-oauth.talkgadget." |
| 24 "google.com/talkgadget/oauth/chrome-remote-desktop/dev"; | 24 "google.com/talkgadget/oauth/chrome-remote-desktop/dev"; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 VLOG(2) << "Calling GetTokenInfo to validate access token"; | 179 VLOG(2) << "Calling GetTokenInfo to validate access token"; |
| 180 | 180 |
| 181 // Create a new GaiaOAuthClient for each request to GAIA. | 181 // Create a new GaiaOAuthClient for each request to GAIA. |
| 182 CreateNewGaiaOAuthClientInstance(); | 182 CreateNewGaiaOAuthClientInstance(); |
| 183 auth_client_->GetTokenInfo(access_token_, kMaxGetTokensRetries, | 183 auth_client_->GetTokenInfo(access_token_, kMaxGetTokensRetries, |
| 184 this); // GaiaOAuthClient::Delegate* delegate | 184 this); // GaiaOAuthClient::Delegate* delegate |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace test | 187 } // namespace test |
| 188 } // namespace remoting | 188 } // namespace remoting |
| OLD | NEW |