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

Side by Side Diff: net/spdy/spdy_test_util_spdy3.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/spdy/spdy_test_util_spdy2.cc ('k') | net/test/base_test_server.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/spdy/spdy_test_util_spdy3.h" 5 #include "net/spdy/spdy_test_util_spdy3.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 session_deps->http_auth_handler_factory.get(); 996 session_deps->http_auth_handler_factory.get();
997 params.http_server_properties = &session_deps->http_server_properties; 997 params.http_server_properties = &session_deps->http_server_properties;
998 HttpNetworkSession* http_session = new HttpNetworkSession(params); 998 HttpNetworkSession* http_session = new HttpNetworkSession(params);
999 SpdySessionPoolPeer pool_peer(http_session->spdy_session_pool()); 999 SpdySessionPoolPeer pool_peer(http_session->spdy_session_pool());
1000 pool_peer.EnableSendingInitialSettings(false); 1000 pool_peer.EnableSendingInitialSettings(false);
1001 return http_session; 1001 return http_session;
1002 } 1002 }
1003 1003
1004 SpdyURLRequestContext::SpdyURLRequestContext() 1004 SpdyURLRequestContext::SpdyURLRequestContext()
1005 : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { 1005 : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {
1006 storage_.set_host_resolver(new MockHostResolver()); 1006 storage_.set_host_resolver(scoped_ptr<HostResolver>(new MockHostResolver));
1007 storage_.set_cert_verifier(new MockCertVerifier); 1007 storage_.set_cert_verifier(new MockCertVerifier);
1008 storage_.set_proxy_service(ProxyService::CreateDirect()); 1008 storage_.set_proxy_service(ProxyService::CreateDirect());
1009 storage_.set_ssl_config_service(new SSLConfigServiceDefaults); 1009 storage_.set_ssl_config_service(new SSLConfigServiceDefaults);
1010 storage_.set_http_auth_handler_factory(HttpAuthHandlerFactory::CreateDefault( 1010 storage_.set_http_auth_handler_factory(HttpAuthHandlerFactory::CreateDefault(
1011 host_resolver())); 1011 host_resolver()));
1012 storage_.set_http_server_properties(new HttpServerPropertiesImpl); 1012 storage_.set_http_server_properties(new HttpServerPropertiesImpl);
1013 net::HttpNetworkSession::Params params; 1013 net::HttpNetworkSession::Params params;
1014 params.client_socket_factory = &socket_factory_; 1014 params.client_socket_factory = &socket_factory_;
1015 params.host_resolver = host_resolver(); 1015 params.host_resolver = host_resolver();
1016 params.cert_verifier = cert_verifier(); 1016 params.cert_verifier = cert_verifier();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 SpdyTestStateHelper::~SpdyTestStateHelper() { 1067 SpdyTestStateHelper::~SpdyTestStateHelper() {
1068 SpdySession::ResetStaticSettingsToInit(); 1068 SpdySession::ResetStaticSettingsToInit();
1069 // TODO(rch): save/restore this value 1069 // TODO(rch): save/restore this value
1070 BufferedSpdyFramer::set_enable_compression_default(true); 1070 BufferedSpdyFramer::set_enable_compression_default(true);
1071 crypto::ECSignatureCreator::SetFactoryForTesting(NULL); 1071 crypto::ECSignatureCreator::SetFactoryForTesting(NULL);
1072 } 1072 }
1073 1073
1074 } // namespace test_spdy3 1074 } // namespace test_spdy3
1075 1075
1076 } // namespace net 1076 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_test_util_spdy2.cc ('k') | net/test/base_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698