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

Side by Side Diff: net/http/http_network_layer_unittest.cc

Issue 15829004: Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license twerk Created 7 years, 6 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/http/http_network_layer.cc ('k') | net/http/http_network_session.h » ('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/http/http_network_layer.h" 5 #include "net/http/http_network_layer.h"
6 6
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "net/base/net_log.h" 8 #include "net/base/net_log.h"
9 #include "net/cert/mock_cert_verifier.h" 9 #include "net/cert/mock_cert_verifier.h"
10 #include "net/dns/mock_host_resolver.h" 10 #include "net/dns/mock_host_resolver.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 void ConfigureTestDependencies(ProxyService* proxy_service) { 33 void ConfigureTestDependencies(ProxyService* proxy_service) {
34 cert_verifier_.reset(new MockCertVerifier); 34 cert_verifier_.reset(new MockCertVerifier);
35 proxy_service_.reset(proxy_service); 35 proxy_service_.reset(proxy_service);
36 HttpNetworkSession::Params session_params; 36 HttpNetworkSession::Params session_params;
37 session_params.client_socket_factory = &mock_socket_factory_; 37 session_params.client_socket_factory = &mock_socket_factory_;
38 session_params.host_resolver = &host_resolver_; 38 session_params.host_resolver = &host_resolver_;
39 session_params.cert_verifier = cert_verifier_.get(); 39 session_params.cert_verifier = cert_verifier_.get();
40 session_params.proxy_service = proxy_service_.get(); 40 session_params.proxy_service = proxy_service_.get();
41 session_params.ssl_config_service = ssl_config_service_; 41 session_params.ssl_config_service = ssl_config_service_.get();
42 session_params.http_server_properties = &http_server_properties_; 42 session_params.http_server_properties = &http_server_properties_;
43 network_session_ = new HttpNetworkSession(session_params); 43 network_session_ = new HttpNetworkSession(session_params);
44 factory_.reset(new HttpNetworkLayer(network_session_)); 44 factory_.reset(new HttpNetworkLayer(network_session_.get()));
45 } 45 }
46 46
47 MockClientSocketFactory mock_socket_factory_; 47 MockClientSocketFactory mock_socket_factory_;
48 MockHostResolver host_resolver_; 48 MockHostResolver host_resolver_;
49 scoped_ptr<CertVerifier> cert_verifier_; 49 scoped_ptr<CertVerifier> cert_verifier_;
50 scoped_ptr<ProxyService> proxy_service_; 50 scoped_ptr<ProxyService> proxy_service_;
51 const scoped_refptr<SSLConfigService> ssl_config_service_; 51 const scoped_refptr<SSLConfigService> ssl_config_service_;
52 scoped_refptr<HttpNetworkSession> network_session_; 52 scoped_refptr<HttpNetworkSession> network_session_;
53 scoped_ptr<HttpNetworkLayer> factory_; 53 scoped_ptr<HttpNetworkLayer> factory_;
54 HttpServerPropertiesImpl http_server_properties_; 54 HttpServerPropertiesImpl http_server_properties_;
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 ASSERT_EQ(ERR_CONNECTION_RESET, callback.GetResult(rv)); 433 ASSERT_EQ(ERR_CONNECTION_RESET, callback.GetResult(rv));
434 434
435 // If the response info is null, that means that any consumer won't 435 // If the response info is null, that means that any consumer won't
436 // see the network accessed bit set. 436 // see the network accessed bit set.
437 EXPECT_EQ(NULL, trans->GetResponseInfo()); 437 EXPECT_EQ(NULL, trans->GetResponseInfo());
438 } 438 }
439 439
440 } // namespace 440 } // namespace
441 441
442 } // namespace net 442 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_layer.cc ('k') | net/http/http_network_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698