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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 params.cert_verifier = cert_verifier(); | 64 params.cert_verifier = cert_verifier(); |
65 params.transport_security_state = transport_security_state(); | 65 params.transport_security_state = transport_security_state(); |
66 params.proxy_service = proxy_service(); | 66 params.proxy_service = proxy_service(); |
67 params.ssl_config_service = ssl_config_service(); | 67 params.ssl_config_service = ssl_config_service(); |
68 params.http_server_properties = http_server_properties(); | 68 params.http_server_properties = http_server_properties(); |
69 scoped_refptr<HttpNetworkSession> network_session( | 69 scoped_refptr<HttpNetworkSession> network_session( |
70 new HttpNetworkSession(params)); | 70 new HttpNetworkSession(params)); |
71 storage_.set_http_transaction_factory(new HttpCache( | 71 storage_.set_http_transaction_factory(new HttpCache( |
72 network_session.get(), HttpCache::DefaultBackend::InMemory(0))); | 72 network_session.get(), HttpCache::DefaultBackend::InMemory(0))); |
73 URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl(); | 73 URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl(); |
74 job_factory->SetProtocolHandler("file", new FileProtocolHandler()); | 74 job_factory->SetProtocolHandler( |
| 75 "file", new FileProtocolHandler(base::MessageLoopProxy::current())); |
75 storage_.set_job_factory(job_factory); | 76 storage_.set_job_factory(job_factory); |
76 } | 77 } |
77 | 78 |
78 virtual ~RequestContext() { | 79 virtual ~RequestContext() { |
79 } | 80 } |
80 | 81 |
81 private: | 82 private: |
82 URLRequestContextStorage storage_; | 83 URLRequestContextStorage storage_; |
83 }; | 84 }; |
84 | 85 |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 { | 473 { |
473 GURL url(kEncodedUrlBroken); | 474 GURL url(kEncodedUrlBroken); |
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 net | 482 } // namespace net |
OLD | NEW |