diff options
Diffstat (limited to 'net/spdy/spdy_test_util_common.h')
-rw-r--r-- | net/spdy/spdy_test_util_common.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/net/spdy/spdy_test_util_common.h b/net/spdy/spdy_test_util_common.h index 50baff7..d7dfbf2 100644 --- a/net/spdy/spdy_test_util_common.h +++ b/net/spdy/spdy_test_util_common.h @@ -37,6 +37,8 @@ namespace net { class BoundNetLog; class SpdySession; +class SpdySessionKey; +class SpdySessionPool; class SpdyStream; class SpdyStreamRequest; @@ -232,13 +234,34 @@ class SpdyURLRequestContext : public URLRequestContext { net::URLRequestContextStorage storage_; }; +// Equivalent to pool->GetIfExists(spdy_session_key, BoundNetLog()) != NULL. +bool HasSpdySession(SpdySessionPool* pool, const SpdySessionKey& key); + +// Creates a SPDY session for the given key and puts it in the SPDY +// session pool in |http_session|. A SPDY session for |key| must not +// already exist. +scoped_refptr<SpdySession> CreateInsecureSpdySession( + const scoped_refptr<HttpNetworkSession>& http_session, + const SpdySessionKey& key, + const BoundNetLog& net_log); + +// Like CreateInsecureSpdySession(), but uses TLS. +scoped_refptr<SpdySession> CreateSecureSpdySession( + const scoped_refptr<HttpNetworkSession>& http_session, + const SpdySessionKey& key, + const BoundNetLog& net_log); + +// Creates an insecure SPDY session for the given key and puts it in +// |pool|. The returned session will neither receiver nor send any +// data. A SPDY session for |key| must not already exist. +scoped_refptr<SpdySession> CreateFakeSpdySession(SpdySessionPool* pool, + const SpdySessionKey& key); + class SpdySessionPoolPeer { public: explicit SpdySessionPoolPeer(SpdySessionPool* pool); - void AddAlias(const IPEndPoint& address, const SpdySessionKey& key); void RemoveAliases(const SpdySessionKey& key); - void RemoveSpdySession(const scoped_refptr<SpdySession>& session); void DisableDomainAuthenticationVerification(); void EnableSendingInitialSettings(bool enabled); |