| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/proxy/proxy_script_fetcher_impl.h" | 5 #include "net/proxy/proxy_script_fetcher_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 params.ct_policy_enforcer = ct_policy_enforcer(); | 91 params.ct_policy_enforcer = ct_policy_enforcer(); |
| 92 params.proxy_service = proxy_service(); | 92 params.proxy_service = proxy_service(); |
| 93 params.ssl_config_service = ssl_config_service(); | 93 params.ssl_config_service = ssl_config_service(); |
| 94 params.http_server_properties = http_server_properties(); | 94 params.http_server_properties = http_server_properties(); |
| 95 storage_.set_http_network_session( | 95 storage_.set_http_network_session( |
| 96 base::MakeUnique<HttpNetworkSession>(params)); | 96 base::MakeUnique<HttpNetworkSession>(params)); |
| 97 storage_.set_http_transaction_factory(base::MakeUnique<HttpCache>( | 97 storage_.set_http_transaction_factory(base::MakeUnique<HttpCache>( |
| 98 storage_.http_network_session(), HttpCache::DefaultBackend::InMemory(0), | 98 storage_.http_network_session(), HttpCache::DefaultBackend::InMemory(0), |
| 99 false)); | 99 false)); |
| 100 std::unique_ptr<URLRequestJobFactoryImpl> job_factory = | 100 std::unique_ptr<URLRequestJobFactoryImpl> job_factory = |
| 101 base::MakeUnique<URLRequestJobFactoryImpl>(); | 101 URLRequestJobFactoryImpl::CreateWithHttpProtocolHandlers(); |
| 102 |
| 102 #if !defined(DISABLE_FILE_SUPPORT) | 103 #if !defined(DISABLE_FILE_SUPPORT) |
| 103 job_factory->SetProtocolHandler("file", | 104 job_factory->SetProtocolHandler("file", |
| 104 base::MakeUnique<FileProtocolHandler>( | 105 base::MakeUnique<FileProtocolHandler>( |
| 105 base::ThreadTaskRunnerHandle::Get())); | 106 base::ThreadTaskRunnerHandle::Get())); |
| 106 #endif | 107 #endif |
| 107 storage_.set_job_factory(std::move(job_factory)); | 108 storage_.set_job_factory(std::move(job_factory)); |
| 108 } | 109 } |
| 109 | 110 |
| 110 ~RequestContext() override { AssertNoURLRequests(); } | 111 ~RequestContext() override { AssertNoURLRequests(); } |
| 111 | 112 |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 base::string16 text; | 492 base::string16 text; |
| 492 TestCompletionCallback callback; | 493 TestCompletionCallback callback; |
| 493 int result = pac_fetcher.Fetch(url, &text, callback.callback()); | 494 int result = pac_fetcher.Fetch(url, &text, callback.callback()); |
| 494 EXPECT_THAT(result, IsError(ERR_FAILED)); | 495 EXPECT_THAT(result, IsError(ERR_FAILED)); |
| 495 } | 496 } |
| 496 } | 497 } |
| 497 | 498 |
| 498 } // namespace | 499 } // namespace |
| 499 | 500 |
| 500 } // namespace net | 501 } // namespace net |
| OLD | NEW |