| 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/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 URLRequest* request, NetworkDelegate* network_delegate) const OVERRIDE { | 66 URLRequest* request, NetworkDelegate* network_delegate) const OVERRIDE { |
| 67 return NULL; | 67 return NULL; |
| 68 } | 68 } |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 // A non-mock URL request which can access http:// and file:// urls. | 71 // A non-mock URL request which can access http:// and file:// urls. |
| 72 class RequestContext : public URLRequestContext { | 72 class RequestContext : public URLRequestContext { |
| 73 public: | 73 public: |
| 74 RequestContext() : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { | 74 RequestContext() : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { |
| 75 ProxyConfig no_proxy; | 75 ProxyConfig no_proxy; |
| 76 storage_.set_host_resolver(new MockHostResolver); | 76 storage_.set_host_resolver(scoped_ptr<HostResolver>(new MockHostResolver)); |
| 77 storage_.set_cert_verifier(new MockCertVerifier); | 77 storage_.set_cert_verifier(new MockCertVerifier); |
| 78 storage_.set_proxy_service(ProxyService::CreateFixed(no_proxy)); | 78 storage_.set_proxy_service(ProxyService::CreateFixed(no_proxy)); |
| 79 storage_.set_ssl_config_service(new SSLConfigServiceDefaults); | 79 storage_.set_ssl_config_service(new SSLConfigServiceDefaults); |
| 80 storage_.set_http_server_properties(new HttpServerPropertiesImpl); | 80 storage_.set_http_server_properties(new HttpServerPropertiesImpl); |
| 81 | 81 |
| 82 HttpNetworkSession::Params params; | 82 HttpNetworkSession::Params params; |
| 83 params.host_resolver = host_resolver(); | 83 params.host_resolver = host_resolver(); |
| 84 params.cert_verifier = cert_verifier(); | 84 params.cert_verifier = cert_verifier(); |
| 85 params.proxy_service = proxy_service(); | 85 params.proxy_service = proxy_service(); |
| 86 params.ssl_config_service = ssl_config_service(); | 86 params.ssl_config_service = ssl_config_service(); |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 { | 488 { |
| 489 GURL url(kEncodedUrlBroken); | 489 GURL url(kEncodedUrlBroken); |
| 490 string16 text; | 490 string16 text; |
| 491 TestCompletionCallback callback; | 491 TestCompletionCallback callback; |
| 492 int result = pac_fetcher.Fetch(url, &text, callback.callback()); | 492 int result = pac_fetcher.Fetch(url, &text, callback.callback()); |
| 493 EXPECT_EQ(ERR_FAILED, result); | 493 EXPECT_EQ(ERR_FAILED, result); |
| 494 } | 494 } |
| 495 } | 495 } |
| 496 | 496 |
| 497 } // namespace net | 497 } // namespace net |
| OLD | NEW |