OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "headless/public/util/url_fetcher.h" | 5 #include "headless/public/util/url_fetcher.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "net/http/http_response_headers.h" | 10 #include "net/http/http_response_headers.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 net::HttpUtil::AssembleRawHeaders(response_data, header_size)); | 30 net::HttpUtil::AssembleRawHeaders(response_data, header_size)); |
31 read_offset = header_size; | 31 read_offset = header_size; |
32 } | 32 } |
33 | 33 |
34 CHECK_LE(read_offset, response_data_size); | 34 CHECK_LE(read_offset, response_data_size); |
35 OnFetchComplete(final_url, http_response_code, std::move(response_headers), | 35 OnFetchComplete(final_url, http_response_code, std::move(response_headers), |
36 response_data + read_offset, | 36 response_data + read_offset, |
37 response_data_size - read_offset); | 37 response_data_size - read_offset); |
38 } | 38 } |
39 | 39 |
40 void URLFetcher::StartFetch(const GURL& rewritten_url, | |
41 const std::string& method, | |
42 const net::HttpRequestHeaders& request_headers, | |
43 const std::string& devtools_request_id, | |
44 ResultListener* result_listener) { | |
45 StartFetch(rewritten_url, method, request_headers, result_listener); | |
46 } | |
47 | |
48 void URLFetcher::StartFetch(const GURL& rewritten_url, | |
49 const std::string& method, | |
50 const net::HttpRequestHeaders& request_headers, | |
51 ResultListener* result_listener) {} | |
52 | |
53 } // namespace headless | 40 } // namespace headless |
OLD | NEW |