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

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

Powered by Google App Engine
This is Rietveld 408576698