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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_stream_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_util.h
===================================================================
--- net/spdy/spdy_test_util.h (revision 93497)
+++ net/spdy/spdy_test_util.h (working copy)
@@ -8,9 +8,11 @@
#include "base/basictypes.h"
#include "net/base/cert_verifier.h"
+#include "net/base/host_port_pair.h"
#include "net/base/mock_host_resolver.h"
#include "net/base/request_priority.h"
#include "net/base/ssl_config_service_defaults.h"
+#include "net/base/sys_addrinfo.h"
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_cache.h"
#include "net/http/http_network_session.h"
@@ -370,6 +372,26 @@
};
const SpdyHeaderInfo make_spdy_header(spdy::SpdyControlType type);
+
+class SpdySessionPoolPeer {
+ public:
+ explicit SpdySessionPoolPeer(SpdySessionPool* pool)
+ : pool_(pool) {}
+
+ void AddAlias(const addrinfo* address, const HostPortProxyPair& pair) {
+ pool_->AddAlias(address, pair);
+ }
+
+ void RemoveSpdySession(const scoped_refptr<SpdySession>& session) {
+ pool_->Remove(session);
+ }
+
+ private:
+ SpdySessionPool* const pool_;
+
+ DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer);
+};
+
} // namespace net
#endif // NET_SPDY_SPDY_TEST_UTIL_H_
« 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