| 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/deterministic_http_protocol_handler.h" | 5 #include "headless/public/util/deterministic_http_protocol_handler.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "headless/public/headless_browser_context.h" | 9 #include "headless/public/headless_browser_context.h" |
| 10 #include "headless/public/util/deterministic_dispatcher.h" | 10 #include "headless/public/util/deterministic_dispatcher.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 void OnPendingRequest(PendingRequest* pending_request) override { | 25 void OnPendingRequest(PendingRequest* pending_request) override { |
| 26 pending_request->AllowRequest(); | 26 pending_request->AllowRequest(); |
| 27 } | 27 } |
| 28 | 28 |
| 29 void OnResourceLoadFailed(const Request* request, net::Error error) override { | 29 void OnResourceLoadFailed(const Request* request, net::Error error) override { |
| 30 } | 30 } |
| 31 | 31 |
| 32 void OnResourceLoadComplete( | 32 void OnResourceLoadComplete( |
| 33 const Request* request, | 33 const Request* request, |
| 34 const GURL& final_url, | 34 const GURL& final_url, |
| 35 int http_response_code, | |
| 36 scoped_refptr<net::HttpResponseHeaders> response_headers, | 35 scoped_refptr<net::HttpResponseHeaders> response_headers, |
| 37 const char* body, | 36 const char* body, |
| 38 size_t body_size) override {} | 37 size_t body_size) override {} |
| 39 | 38 |
| 40 private: | 39 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(NopGenericURLRequestJobDelegate); | 40 DISALLOW_COPY_AND_ASSIGN(NopGenericURLRequestJobDelegate); |
| 42 }; | 41 }; |
| 43 | 42 |
| 44 DeterministicHttpProtocolHandler::DeterministicHttpProtocolHandler( | 43 DeterministicHttpProtocolHandler::DeterministicHttpProtocolHandler( |
| 45 DeterministicDispatcher* deterministic_dispatcher, | 44 DeterministicDispatcher* deterministic_dispatcher, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 67 url_request_job_factory_.reset(new net::URLRequestJobFactoryImpl()); | 66 url_request_job_factory_.reset(new net::URLRequestJobFactoryImpl()); |
| 68 url_request_context_->set_job_factory(url_request_job_factory_.get()); | 67 url_request_context_->set_job_factory(url_request_job_factory_.get()); |
| 69 } | 68 } |
| 70 return new GenericURLRequestJob( | 69 return new GenericURLRequestJob( |
| 71 request, network_delegate, deterministic_dispatcher_, | 70 request, network_delegate, deterministic_dispatcher_, |
| 72 base::MakeUnique<HttpURLFetcher>(url_request_context_.get()), | 71 base::MakeUnique<HttpURLFetcher>(url_request_context_.get()), |
| 73 nop_delegate_.get()); | 72 nop_delegate_.get()); |
| 74 } | 73 } |
| 75 | 74 |
| 76 } // namespace headless | 75 } // namespace headless |
| OLD | NEW |