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

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

Issue 1298253002: Remove reference counting from HttpNetworkSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 5 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
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_proxy_client_socket_pool.h" 5 #include "net/http/http_proxy_client_socket_pool.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 InitializeSpdySsl(); 280 InitializeSpdySsl();
281 } 281 }
282 socket_factory()->AddSSLSocketDataProvider(ssl_data_.get()); 282 socket_factory()->AddSSLSocketDataProvider(ssl_data_.get());
283 } 283 }
284 } 284 }
285 285
286 void InitializeSpdySsl() { 286 void InitializeSpdySsl() {
287 ssl_data_->SetNextProto(GetParam().protocol); 287 ssl_data_->SetNextProto(GetParam().protocol);
288 } 288 }
289 289
290 HttpNetworkSession* CreateNetworkSession() { 290 scoped_ptr<HttpNetworkSession> CreateNetworkSession() {
291 return SpdySessionDependencies::SpdyCreateSession(&session_deps_); 291 return SpdySessionDependencies::SpdyCreateSession(&session_deps_);
292 } 292 }
293 293
294 RequestPriority GetLastTransportRequestPriority() const { 294 RequestPriority GetLastTransportRequestPriority() const {
295 return transport_socket_pool_.last_request_priority(); 295 return transport_socket_pool_.last_request_priority();
296 } 296 }
297 297
298 private: 298 private:
299 SpdySessionDependencies session_deps_; 299 SpdySessionDependencies session_deps_;
300 300
301 MockTransportClientSocketPool transport_socket_pool_; 301 MockTransportClientSocketPool transport_socket_pool_;
302 MockHostResolver host_resolver_; 302 MockHostResolver host_resolver_;
303 scoped_ptr<CertVerifier> cert_verifier_; 303 scoped_ptr<CertVerifier> cert_verifier_;
304 SSLClientSocketPool ssl_socket_pool_; 304 SSLClientSocketPool ssl_socket_pool_;
305 305
306 const scoped_refptr<HttpNetworkSession> session_; 306 const scoped_ptr<HttpNetworkSession> session_;
307 307
308 protected: 308 protected:
309 SpdyTestUtil spdy_util_; 309 SpdyTestUtil spdy_util_;
310 scoped_ptr<SSLSocketDataProvider> ssl_data_; 310 scoped_ptr<SSLSocketDataProvider> ssl_data_;
311 scoped_ptr<SequencedSocketData> data_; 311 scoped_ptr<SequencedSocketData> data_;
312 HttpProxyClientSocketPool pool_; 312 HttpProxyClientSocketPool pool_;
313 ClientSocketHandle handle_; 313 ClientSocketHandle handle_;
314 TestCompletionCallback callback_; 314 TestCompletionCallback callback_;
315 }; 315 };
316 316
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 EXPECT_TRUE(headers->IsRedirect(&location)); 812 EXPECT_TRUE(headers->IsRedirect(&location));
813 EXPECT_EQ(location, redirectTarget); 813 EXPECT_EQ(location, redirectTarget);
814 } 814 }
815 } 815 }
816 816
817 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. 817 // It would be nice to also test the timeouts in HttpProxyClientSocketPool.
818 818
819 } // namespace 819 } // namespace
820 820
821 } // namespace net 821 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_response_body_drainer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698