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

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

Issue 2928763002: Move SpdySessionRequestMap to SpdySessionPool (Closed)
Patch Set: self 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
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..0deea885896e88533fbd8f336e112e65c3e8351d 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,30 @@ 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);
+
+ void RemoveRequestFromSpdySessionRequestMap(
Bence 2017/06/07 17:41:43 Please add comments for all public methods.
Bence 2017/06/07 17:41:43 Optional: You could list "Add" before "Remove", th
xunjieli 2017/06/07 21:55:56 Done.
xunjieli 2017/06/07 21:55:56 Done.
+ HttpStreamFactoryImpl::Request* request);
+
+ void AddRequestToSpdySessionRequestMap(
+ const SpdySessionKey& spdy_session_key,
+ 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 +267,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_;

Powered by Google App Engine
This is Rietveld 408576698