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

Side by Side Diff: net/spdy/spdy_test_util.h

Issue 7349023: Changed SPDY's ip connection pooling logic to only add the used IP, (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef NET_SPDY_SPDY_TEST_UTIL_H_ 5 #ifndef NET_SPDY_SPDY_TEST_UTIL_H_
6 #define NET_SPDY_SPDY_TEST_UTIL_H_ 6 #define NET_SPDY_SPDY_TEST_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "net/base/cert_verifier.h" 10 #include "net/base/cert_verifier.h"
11 #include "net/base/host_port_pair.h"
12 #include "net/base/ip_endpoint.h"
11 #include "net/base/mock_host_resolver.h" 13 #include "net/base/mock_host_resolver.h"
12 #include "net/base/request_priority.h" 14 #include "net/base/request_priority.h"
13 #include "net/base/ssl_config_service_defaults.h" 15 #include "net/base/ssl_config_service_defaults.h"
14 #include "net/http/http_auth_handler_factory.h" 16 #include "net/http/http_auth_handler_factory.h"
15 #include "net/http/http_cache.h" 17 #include "net/http/http_cache.h"
16 #include "net/http/http_network_session.h" 18 #include "net/http/http_network_session.h"
17 #include "net/http/http_network_layer.h" 19 #include "net/http/http_network_layer.h"
18 #include "net/http/http_transaction_factory.h" 20 #include "net/http/http_transaction_factory.h"
19 #include "net/proxy/proxy_service.h" 21 #include "net/proxy/proxy_service.h"
20 #include "net/socket/socket_test_util.h" 22 #include "net/socket/socket_test_util.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 net::URLRequestContextStorage storage_; 371 net::URLRequestContextStorage storage_;
370 }; 372 };
371 373
372 const SpdyHeaderInfo MakeSpdyHeader(spdy::SpdyControlType type); 374 const SpdyHeaderInfo MakeSpdyHeader(spdy::SpdyControlType type);
373 375
374 class SpdySessionPoolPeer { 376 class SpdySessionPoolPeer {
375 public: 377 public:
376 explicit SpdySessionPoolPeer(SpdySessionPool* pool) 378 explicit SpdySessionPoolPeer(SpdySessionPool* pool)
377 : pool_(pool) {} 379 : pool_(pool) {}
378 380
381 void AddAlias(const IPEndPoint& endpoint, const HostPortProxyPair& pair) {
382 pool_->AddAlias(endpoint, pair);
383 }
384
379 void RemoveSpdySession(const scoped_refptr<SpdySession>& session) { 385 void RemoveSpdySession(const scoped_refptr<SpdySession>& session) {
380 pool_->Remove(session); 386 pool_->Remove(session);
381 } 387 }
382 388
383 void DisableDomainAuthenticationVerification() { 389 void DisableDomainAuthenticationVerification() {
384 pool_->verify_domain_authentication_ = false; 390 pool_->verify_domain_authentication_ = false;
385 } 391 }
386 392
387 private: 393 private:
388 SpdySessionPool* const pool_; 394 SpdySessionPool* const pool_;
389 395
390 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer); 396 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer);
391 }; 397 };
392 398
393 } // namespace net 399 } // namespace net
394 400
395 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ 401 #endif // NET_SPDY_SPDY_TEST_UTIL_H_
OLDNEW
« net/spdy/spdy_session_pool.cc ('K') | « net/spdy/spdy_session_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698