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

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

Issue 2041863002: Remove HttpServerProperies::GetWeakPtr(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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
« no previous file with comments | « ios/crnet/crnet_environment.mm ('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 <utility> 7 #include <utility>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "net/cert/mock_cert_verifier.h" 10 #include "net/cert/mock_cert_verifier.h"
(...skipping 26 matching lines...) Expand all
37 cert_verifier_.reset(new MockCertVerifier); 37 cert_verifier_.reset(new MockCertVerifier);
38 transport_security_state_.reset(new TransportSecurityState); 38 transport_security_state_.reset(new TransportSecurityState);
39 proxy_service_ = std::move(proxy_service); 39 proxy_service_ = std::move(proxy_service);
40 HttpNetworkSession::Params session_params; 40 HttpNetworkSession::Params session_params;
41 session_params.client_socket_factory = &mock_socket_factory_; 41 session_params.client_socket_factory = &mock_socket_factory_;
42 session_params.host_resolver = &host_resolver_; 42 session_params.host_resolver = &host_resolver_;
43 session_params.cert_verifier = cert_verifier_.get(); 43 session_params.cert_verifier = cert_verifier_.get();
44 session_params.transport_security_state = transport_security_state_.get(); 44 session_params.transport_security_state = transport_security_state_.get();
45 session_params.proxy_service = proxy_service_.get(); 45 session_params.proxy_service = proxy_service_.get();
46 session_params.ssl_config_service = ssl_config_service_.get(); 46 session_params.ssl_config_service = ssl_config_service_.get();
47 session_params.http_server_properties = 47 session_params.http_server_properties = &http_server_properties_;
48 http_server_properties_.GetWeakPtr();
49 network_session_.reset(new HttpNetworkSession(session_params)); 48 network_session_.reset(new HttpNetworkSession(session_params));
50 factory_.reset(new HttpNetworkLayer(network_session_.get())); 49 factory_.reset(new HttpNetworkLayer(network_session_.get()));
51 } 50 }
52 51
53 void ExecuteRequestExpectingContentAndHeader(const std::string& method, 52 void ExecuteRequestExpectingContentAndHeader(const std::string& method,
54 const std::string& content, 53 const std::string& content,
55 const std::string& header, 54 const std::string& header,
56 const std::string& value) { 55 const std::string& value) {
57 TestCompletionCallback callback; 56 TestCompletionCallback callback;
58 57
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 rv = trans->Start(&request_info, callback.callback(), BoundNetLog()); 395 rv = trans->Start(&request_info, callback.callback(), BoundNetLog());
397 ASSERT_EQ(ERR_CONNECTION_RESET, callback.GetResult(rv)); 396 ASSERT_EQ(ERR_CONNECTION_RESET, callback.GetResult(rv));
398 397
399 // network_accessed is true; the HTTP stack did try to make a connection. 398 // network_accessed is true; the HTTP stack did try to make a connection.
400 EXPECT_TRUE(trans->GetResponseInfo()->network_accessed); 399 EXPECT_TRUE(trans->GetResponseInfo()->network_accessed);
401 } 400 }
402 401
403 } // namespace 402 } // namespace
404 403
405 } // namespace net 404 } // namespace net
OLDNEW
« no previous file with comments | « ios/crnet/crnet_environment.mm ('k') | net/http/http_network_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698