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

Side by Side Diff: webkit/tools/test_shell/test_shell_request_context.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, 1 month 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 | « sync/tools/sync_listen_notifications.cc ('k') | no next file » | 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 "webkit/tools/test_shell/test_shell_request_context.h" 5 #include "webkit/tools/test_shell/test_shell_request_context.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // issues. 70 // issues.
71 // TODO(port): rename "linux" to some nonspecific unix. 71 // TODO(port): rename "linux" to some nonspecific unix.
72 scoped_ptr<net::ProxyConfigService> proxy_config_service( 72 scoped_ptr<net::ProxyConfigService> proxy_config_service(
73 new net::ProxyConfigServiceFixed(net::ProxyConfig())); 73 new net::ProxyConfigServiceFixed(net::ProxyConfig()));
74 #else 74 #else
75 // Use the system proxy settings. 75 // Use the system proxy settings.
76 scoped_ptr<net::ProxyConfigService> proxy_config_service( 76 scoped_ptr<net::ProxyConfigService> proxy_config_service(
77 net::ProxyService::CreateSystemProxyConfigService( 77 net::ProxyService::CreateSystemProxyConfigService(
78 base::ThreadTaskRunnerHandle::Get(), NULL)); 78 base::ThreadTaskRunnerHandle::Get(), NULL));
79 #endif 79 #endif
80 storage_.set_host_resolver( 80 storage_.set_host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
81 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism,
82 net::HostResolver::kDefaultRetryAttempts,
83 NULL));
84 storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); 81 storage_.set_cert_verifier(net::CertVerifier::CreateDefault());
85 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( 82 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver(
86 proxy_config_service.release(), 0, NULL)); 83 proxy_config_service.release(), 0, NULL));
87 storage_.set_ssl_config_service( 84 storage_.set_ssl_config_service(
88 new net::SSLConfigServiceDefaults); 85 new net::SSLConfigServiceDefaults);
89 86
90 storage_.set_http_auth_handler_factory( 87 storage_.set_http_auth_handler_factory(
91 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); 88 net::HttpAuthHandlerFactory::CreateDefault(host_resolver()));
92 storage_.set_http_server_properties( 89 storage_.set_http_server_properties(
93 new net::HttpServerPropertiesImpl); 90 new net::HttpServerPropertiesImpl);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 storage_.set_job_factory(job_factory); 130 storage_.set_job_factory(job_factory);
134 } 131 }
135 132
136 TestShellRequestContext::~TestShellRequestContext() { 133 TestShellRequestContext::~TestShellRequestContext() {
137 } 134 }
138 135
139 const std::string& TestShellRequestContext::GetUserAgent( 136 const std::string& TestShellRequestContext::GetUserAgent(
140 const GURL& url) const { 137 const GURL& url) const {
141 return webkit_glue::GetUserAgent(url); 138 return webkit_glue::GetUserAgent(url);
142 } 139 }
OLDNEW
« no previous file with comments | « sync/tools/sync_listen_notifications.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698