| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, | 40 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, |
| 41 NULL, NULL); | 41 NULL, NULL); |
| 42 cert_verifier_ = new net::CertVerifier; | 42 cert_verifier_ = new net::CertVerifier; |
| 43 proxy_service_ = net::ProxyService::CreateFixed(no_proxy); | 43 proxy_service_ = net::ProxyService::CreateFixed(no_proxy); |
| 44 ssl_config_service_ = new net::SSLConfigServiceDefaults; | 44 ssl_config_service_ = new net::SSLConfigServiceDefaults; |
| 45 | 45 |
| 46 http_transaction_factory_ = new net::HttpCache( | 46 http_transaction_factory_ = new net::HttpCache( |
| 47 net::HttpNetworkLayer::CreateFactory(host_resolver_, cert_verifier_, | 47 net::HttpNetworkLayer::CreateFactory(host_resolver_, cert_verifier_, |
| 48 NULL, NULL, NULL, proxy_service_, ssl_config_service_, NULL, NULL, | 48 NULL, NULL, NULL, proxy_service_, ssl_config_service_, NULL, NULL, |
| 49 NULL), | 49 NULL), |
| 50 NULL, | |
| 51 net::HttpCache::DefaultBackend::InMemory(0)); | 50 net::HttpCache::DefaultBackend::InMemory(0)); |
| 52 } | 51 } |
| 53 | 52 |
| 54 private: | 53 private: |
| 55 ~RequestContext() { | 54 ~RequestContext() { |
| 56 delete http_transaction_factory_; | 55 delete http_transaction_factory_; |
| 57 delete cert_verifier_; | 56 delete cert_verifier_; |
| 58 delete host_resolver_; | 57 delete host_resolver_; |
| 59 } | 58 } |
| 60 }; | 59 }; |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 string16 text; | 325 string16 text; |
| 327 TestCompletionCallback callback; | 326 TestCompletionCallback callback; |
| 328 int result = pac_fetcher.Fetch(url, &text, &callback); | 327 int result = pac_fetcher.Fetch(url, &text, &callback); |
| 329 EXPECT_EQ(ERR_IO_PENDING, result); | 328 EXPECT_EQ(ERR_IO_PENDING, result); |
| 330 EXPECT_EQ(OK, callback.WaitForResult()); | 329 EXPECT_EQ(OK, callback.WaitForResult()); |
| 331 EXPECT_EQ(ASCIIToUTF16("This was encoded as UTF-16BE.\n"), text); | 330 EXPECT_EQ(ASCIIToUTF16("This was encoded as UTF-16BE.\n"), text); |
| 332 } | 331 } |
| 333 } | 332 } |
| 334 | 333 |
| 335 } // namespace net | 334 } // namespace net |
| OLD | NEW |