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