| 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" |
| 11 #include "headless/public/util/generic_url_request_job.h" | 11 #include "headless/public/util/generic_url_request_job.h" |
| 12 #include "headless/public/util/http_url_fetcher.h" | 12 #include "headless/public/util/http_url_fetcher.h" |
| 13 #include "net/http/http_response_headers.h" |
| 13 #include "net/url_request/url_request_context.h" | 14 #include "net/url_request/url_request_context.h" |
| 14 #include "net/url_request/url_request_job_factory_impl.h" | 15 #include "net/url_request/url_request_job_factory_impl.h" |
| 15 | 16 |
| 16 namespace headless { | 17 namespace headless { |
| 17 | 18 |
| 18 class DeterministicHttpProtocolHandler::NopGenericURLRequestJobDelegate | 19 class DeterministicHttpProtocolHandler::NopGenericURLRequestJobDelegate |
| 19 : public GenericURLRequestJob::Delegate { | 20 : public GenericURLRequestJob::Delegate { |
| 20 public: | 21 public: |
| 21 NopGenericURLRequestJobDelegate() {} | 22 NopGenericURLRequestJobDelegate() {} |
| 22 ~NopGenericURLRequestJobDelegate() override {} | 23 ~NopGenericURLRequestJobDelegate() override {} |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 url_request_job_factory_.reset(new net::URLRequestJobFactoryImpl()); | 67 url_request_job_factory_.reset(new net::URLRequestJobFactoryImpl()); |
| 67 url_request_context_->set_job_factory(url_request_job_factory_.get()); | 68 url_request_context_->set_job_factory(url_request_job_factory_.get()); |
| 68 } | 69 } |
| 69 return new GenericURLRequestJob( | 70 return new GenericURLRequestJob( |
| 70 request, network_delegate, deterministic_dispatcher_, | 71 request, network_delegate, deterministic_dispatcher_, |
| 71 base::MakeUnique<HttpURLFetcher>(url_request_context_.get()), | 72 base::MakeUnique<HttpURLFetcher>(url_request_context_.get()), |
| 72 nop_delegate_.get()); | 73 nop_delegate_.get()); |
| 73 } | 74 } |
| 74 | 75 |
| 75 } // namespace headless | 76 } // namespace headless |
| OLD | NEW |