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

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

Issue 7484051: Merging SPDY IP connection pooling changes from the trunk (r93105) (Closed) Base URL: svn://svn.chromium.org/chrome/branches/782/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
« no previous file with comments | « net/spdy/spdy_stream_unittest.cc ('k') | no next file » | 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) 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"
11 #include "net/base/mock_host_resolver.h" 12 #include "net/base/mock_host_resolver.h"
12 #include "net/base/request_priority.h" 13 #include "net/base/request_priority.h"
13 #include "net/base/ssl_config_service_defaults.h" 14 #include "net/base/ssl_config_service_defaults.h"
15 #include "net/base/sys_addrinfo.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"
21 #include "net/spdy/spdy_framer.h" 23 #include "net/spdy/spdy_framer.h"
22 #include "net/url_request/url_request_context.h" 24 #include "net/url_request/url_request_context.h"
23 #include "net/url_request/url_request_context_storage.h" 25 #include "net/url_request/url_request_context_storage.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 365
364 protected: 366 protected:
365 virtual ~SpdyURLRequestContext(); 367 virtual ~SpdyURLRequestContext();
366 368
367 private: 369 private:
368 MockClientSocketFactory socket_factory_; 370 MockClientSocketFactory socket_factory_;
369 net::URLRequestContextStorage storage_; 371 net::URLRequestContextStorage storage_;
370 }; 372 };
371 373
372 const SpdyHeaderInfo make_spdy_header(spdy::SpdyControlType type); 374 const SpdyHeaderInfo make_spdy_header(spdy::SpdyControlType type);
375
376 class SpdySessionPoolPeer {
377 public:
378 explicit SpdySessionPoolPeer(SpdySessionPool* pool)
379 : pool_(pool) {}
380
381 void AddAlias(const addrinfo* address, const HostPortProxyPair& pair) {
382 pool_->AddAlias(address, pair);
383 }
384
385 void RemoveSpdySession(const scoped_refptr<SpdySession>& session) {
386 pool_->Remove(session);
387 }
388
389 private:
390 SpdySessionPool* const pool_;
391
392 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer);
393 };
394
373 } // namespace net 395 } // namespace net
374 396
375 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ 397 #endif // NET_SPDY_SPDY_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698