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

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

Issue 2811072: SPDY sends RST_STREAM upon cancelling request, or bad header parse data. (Closed)
Patch Set: Merge trunk Created 10 years, 4 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
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_stream.cc » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_SESSION_POOL_H_ 5 #ifndef NET_SPDY_SPDY_SESSION_POOL_H_
6 #define NET_SPDY_SPDY_SESSION_POOL_H_ 6 #define NET_SPDY_SPDY_SESSION_POOL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <list> 10 #include <list>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 scoped_refptr<SpdySession>* spdy_session, 64 scoped_refptr<SpdySession>* spdy_session,
65 bool is_secure); 65 bool is_secure);
66 66
67 // TODO(willchan): Consider renaming to HasReusableSession, since perhaps we 67 // TODO(willchan): Consider renaming to HasReusableSession, since perhaps we
68 // should be creating a new session. 68 // should be creating a new session.
69 bool HasSession(const HostPortPair& host_port_pair)const; 69 bool HasSession(const HostPortPair& host_port_pair)const;
70 70
71 // Close all Spdy Sessions; used for debugging. 71 // Close all Spdy Sessions; used for debugging.
72 void CloseAllSessions(); 72 void CloseAllSessions();
73 73
74 // Removes a SpdySession from the SpdySessionPool. 74 // Removes a SpdySession from the SpdySessionPool. This should only be called
75 // by SpdySession, because otherwise session->state_ is not set to CLOSED.
75 void Remove(const scoped_refptr<SpdySession>& session); 76 void Remove(const scoped_refptr<SpdySession>& session);
76 77
77 // NetworkChangeNotifier::Observer methods: 78 // NetworkChangeNotifier::Observer methods:
78 79
79 // We flush all idle sessions and release references to the active ones so 80 // We flush all idle sessions and release references to the active ones so
80 // they won't get re-used. The active ones will either complete successfully 81 // they won't get re-used. The active ones will either complete successfully
81 // or error out due to the IP address change. 82 // or error out due to the IP address change.
82 virtual void OnIPAddressChanged(); 83 virtual void OnIPAddressChanged();
83 84
84 private: 85 private:
(...skipping 23 matching lines...) Expand all
108 SpdySessionsMap sessions_; 109 SpdySessionsMap sessions_;
109 110
110 static int g_max_sessions_per_domain; 111 static int g_max_sessions_per_domain;
111 112
112 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); 113 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool);
113 }; 114 };
114 115
115 } // namespace net 116 } // namespace net
116 117
117 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ 118 #endif // NET_SPDY_SPDY_SESSION_POOL_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698