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 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 storage_.set_http_server_properties( | 68 storage_.set_http_server_properties( |
69 scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl())); | 69 scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl())); |
70 | 70 |
71 HttpNetworkSession::Params params; | 71 HttpNetworkSession::Params params; |
72 params.host_resolver = host_resolver(); | 72 params.host_resolver = host_resolver(); |
73 params.cert_verifier = cert_verifier(); | 73 params.cert_verifier = cert_verifier(); |
74 params.transport_security_state = transport_security_state(); | 74 params.transport_security_state = transport_security_state(); |
75 params.proxy_service = proxy_service(); | 75 params.proxy_service = proxy_service(); |
76 params.ssl_config_service = ssl_config_service(); | 76 params.ssl_config_service = ssl_config_service(); |
77 params.http_server_properties = http_server_properties(); | 77 params.http_server_properties = http_server_properties(); |
78 scoped_refptr<HttpNetworkSession> network_session( | 78 storage_.set_http_network_session( |
79 new HttpNetworkSession(params)); | 79 make_scoped_ptr(new HttpNetworkSession(params))); |
80 storage_.set_http_transaction_factory(new HttpCache( | 80 storage_.set_http_transaction_factory( |
81 network_session.get(), HttpCache::DefaultBackend::InMemory(0))); | 81 new HttpCache(storage_.http_network_session(), |
| 82 HttpCache::DefaultBackend::InMemory(0), false)); |
82 URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl(); | 83 URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl(); |
83 #if !defined(DISABLE_FILE_SUPPORT) | 84 #if !defined(DISABLE_FILE_SUPPORT) |
84 job_factory->SetProtocolHandler("file", | 85 job_factory->SetProtocolHandler("file", |
85 make_scoped_ptr(new FileProtocolHandler( | 86 make_scoped_ptr(new FileProtocolHandler( |
86 base::ThreadTaskRunnerHandle::Get()))); | 87 base::ThreadTaskRunnerHandle::Get()))); |
87 #endif | 88 #endif |
88 storage_.set_job_factory(job_factory); | 89 storage_.set_job_factory(job_factory); |
89 } | 90 } |
90 | 91 |
91 ~RequestContext() override { AssertNoURLRequests(); } | 92 ~RequestContext() override { AssertNoURLRequests(); } |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 base::string16 text; | 475 base::string16 text; |
475 TestCompletionCallback callback; | 476 TestCompletionCallback callback; |
476 int result = pac_fetcher.Fetch(url, &text, callback.callback()); | 477 int result = pac_fetcher.Fetch(url, &text, callback.callback()); |
477 EXPECT_EQ(ERR_FAILED, result); | 478 EXPECT_EQ(ERR_FAILED, result); |
478 } | 479 } |
479 } | 480 } |
480 | 481 |
481 } // namespace | 482 } // namespace |
482 | 483 |
483 } // namespace net | 484 } // namespace net |
OLD | NEW |