| 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/host/gcd_rest_client.h" | 5 #include "remoting/host/gcd_rest_client.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/callback_helpers.h" | 12 #include "base/callback_helpers.h" |
| 13 #include "base/json/json_writer.h" | 13 #include "base/json/json_writer.h" |
| 14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
| 15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
| 16 #include "base/time/default_clock.h" | 16 #include "base/time/default_clock.h" |
| 17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "net/url_request/url_fetcher.h" | 18 #include "net/url_request/url_fetcher.h" |
| 19 #include "remoting/base/logging.h" | 19 #include "remoting/base/logging.h" |
| 20 | 20 |
| 21 namespace remoting { | 21 namespace remoting { |
| 22 | 22 |
| 23 GcdRestClient::GcdRestClient(const std::string& gcd_base_url, | 23 GcdRestClient::GcdRestClient(const std::string& gcd_base_url, |
| 24 const std::string& gcd_device_id, | 24 const std::string& gcd_device_id, |
| 25 const scoped_refptr<net::URLRequestContextGetter>& | 25 const scoped_refptr<net::URLRequestContextGetter>& |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 << ") fetching URL: " << request_url; | 137 << ") fetching URL: " << request_url; |
| 138 status = NETWORK_ERROR; | 138 status = NETWORK_ERROR; |
| 139 } else { | 139 } else { |
| 140 LOG(ERROR) << "Error (" << response << ") fetching URL: " << request_url; | 140 LOG(ERROR) << "Error (" << response << ") fetching URL: " << request_url; |
| 141 } | 141 } |
| 142 | 142 |
| 143 FinishCurrentRequest(status); | 143 FinishCurrentRequest(status); |
| 144 } | 144 } |
| 145 | 145 |
| 146 } // namespace remoting | 146 } // namespace remoting |
| OLD | NEW |