| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 HttpNetworkSession::Params params; | 59 HttpNetworkSession::Params params; |
| 60 params.host_resolver = host_resolver(); | 60 params.host_resolver = host_resolver(); |
| 61 params.cert_verifier = cert_verifier(); | 61 params.cert_verifier = cert_verifier(); |
| 62 params.proxy_service = proxy_service(); | 62 params.proxy_service = proxy_service(); |
| 63 params.ssl_config_service = ssl_config_service(); | 63 params.ssl_config_service = ssl_config_service(); |
| 64 params.http_server_properties = http_server_properties(); | 64 params.http_server_properties = http_server_properties(); |
| 65 scoped_refptr<HttpNetworkSession> network_session( | 65 scoped_refptr<HttpNetworkSession> network_session( |
| 66 new HttpNetworkSession(params)); | 66 new HttpNetworkSession(params)); |
| 67 storage_.set_http_transaction_factory(new HttpCache( | 67 storage_.set_http_transaction_factory(new HttpCache( |
| 68 network_session, | 68 network_session.get(), HttpCache::DefaultBackend::InMemory(0))); |
| 69 HttpCache::DefaultBackend::InMemory(0))); | |
| 70 URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl(); | 69 URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl(); |
| 71 job_factory->SetProtocolHandler("file", new FileProtocolHandler()); | 70 job_factory->SetProtocolHandler("file", new FileProtocolHandler()); |
| 72 storage_.set_job_factory(job_factory); | 71 storage_.set_job_factory(job_factory); |
| 73 } | 72 } |
| 74 | 73 |
| 75 virtual ~RequestContext() { | 74 virtual ~RequestContext() { |
| 76 } | 75 } |
| 77 | 76 |
| 78 private: | 77 private: |
| 79 URLRequestContextStorage storage_; | 78 URLRequestContextStorage storage_; |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 { | 475 { |
| 477 GURL url(kEncodedUrlBroken); | 476 GURL url(kEncodedUrlBroken); |
| 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 net | 484 } // namespace net |
| OLD | NEW |