Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: net/proxy/proxy_script_fetcher_impl_unittest.cc

Issue 10831277: [net] Change factory methods for HostResolver and HostCache to return a scoped_ptr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary initialization; respond to review Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/curvecp/test_client.cc ('k') | net/spdy/spdy_test_util_spdy2.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/curvecp/test_client.cc ('k') | net/spdy/spdy_test_util_spdy2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698