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

Unified Diff: net/spdy/chromium/spdy_session_pool.h

Issue 2928763002: Move SpdySessionRequestMap to SpdySessionPool (Closed)
Patch Set: address comment Created 3 years, 6 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/http/http_stream_factory_impl_job_controller.cc ('k') | net/spdy/chromium/spdy_session_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/chromium/spdy_session_pool.h
diff --git a/net/spdy/chromium/spdy_session_pool.h b/net/spdy/chromium/spdy_session_pool.h
index 186cca9d7907b91539c9625fe1ec12ffd943a1bd..613a3d9ed0301daaed4d6b7729cdc2262f5646ff 100644
--- a/net/spdy/chromium/spdy_session_pool.h
+++ b/net/spdy/chromium/spdy_session_pool.h
@@ -21,6 +21,7 @@
#include "net/base/net_export.h"
#include "net/base/network_change_notifier.h"
#include "net/cert/cert_database.h"
+#include "net/http/http_stream_factory_impl_request.h"
#include "net/proxy/proxy_config.h"
#include "net/proxy/proxy_server.h"
#include "net/spdy/chromium/server_push_delegate.h"
@@ -166,9 +167,34 @@ class NET_EXPORT SpdySessionPool
void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd,
const SpdyString& parent_dump_absolute_name) const;
+ // Called when a SpdySession is ready. It will find appropriate Requests and
+ // fulfill them. |direct| indicates whether or not |spdy_session| uses a
+ // proxy.
+ void OnNewSpdySessionReady(const base::WeakPtr<SpdySession>& spdy_session,
+ bool direct,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ bool was_alpn_negotiated,
+ NextProto negotiated_protocol,
+ bool using_spdy,
+ NetLogSource source_dependency);
+
+ // Adds |request| to |spdy_session_request_map_| under |spdy_session_key| Key.
+ // Sets |spdy_session_key| as |request|'s SpdySessionKey.
+ void AddRequestToSpdySessionRequestMap(
+ const SpdySessionKey& spdy_session_key,
+ HttpStreamFactoryImpl::Request* request);
+
+ // Removes |request| from |spdy_session_request_map_|. No-op if |request| does
+ // not have a SpdySessionKey.
+ void RemoveRequestFromSpdySessionRequestMap(
+ HttpStreamFactoryImpl::Request* request);
+
private:
friend class SpdySessionPoolPeer; // For testing.
+ typedef std::set<HttpStreamFactoryImpl::Request*> RequestSet;
+ typedef std::map<SpdySessionKey, RequestSet> SpdySessionRequestMap;
typedef std::set<SpdySession*> SessionSet;
typedef std::vector<base::WeakPtr<SpdySession> > WeakSessionList;
typedef std::map<SpdySessionKey, base::WeakPtr<SpdySession> >
@@ -245,6 +271,8 @@ class NET_EXPORT SpdySessionPool
// and maximum HPACK dynamic table size.
const SettingsMap initial_settings_;
+ SpdySessionRequestMap spdy_session_request_map_;
+
TimeFunc time_func_;
ServerPushDelegate* push_delegate_;
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller.cc ('k') | net/spdy/chromium/spdy_session_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698