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/remote_host_info_fetcher.h" | 5 #include "remoting/test/remote_host_info_fetcher.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "base/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "net/http/http_response_headers.h" | 14 #include "net/http/http_response_headers.h" |
15 #include "net/http/http_status_code.h" | 15 #include "net/http/http_status_code.h" |
16 #include "net/url_request/url_fetcher.h" | 16 #include "net/url_request/url_fetcher.h" |
17 #include "remoting/base/url_request_context_getter.h" | 17 #include "remoting/base/url_request_context_getter.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 const char kRequestTestOrigin[] = | 20 const char kRequestTestOrigin[] = |
21 "Origin: chrome-extension://ljacajndfccfgnfohlgkdphmbnpkjflk"; | 21 "Origin: chrome-extension://ljacajndfccfgnfohlgkdphmbnpkjflk"; |
22 } | 22 } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 response->GetString("authorizationCode", | 115 response->GetString("authorizationCode", |
116 &remote_host_info.authorization_code); | 116 &remote_host_info.authorization_code); |
117 response->GetString("sharedSecret", &remote_host_info.shared_secret); | 117 response->GetString("sharedSecret", &remote_host_info.shared_secret); |
118 } | 118 } |
119 | 119 |
120 base::ResetAndReturn(&remote_host_info_callback_).Run(remote_host_info); | 120 base::ResetAndReturn(&remote_host_info_callback_).Run(remote_host_info); |
121 } | 121 } |
122 | 122 |
123 } // namespace test | 123 } // namespace test |
124 } // namespace remoting | 124 } // namespace remoting |
OLD | NEW |