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

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

Issue 3108038: Fix bug where pushed SPDY streams were never actually closed.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Will's comments 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 | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/spdy/spdy_session.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_H_ 5 #ifndef NET_SPDY_SPDY_SESSION_H_
6 #define NET_SPDY_SPDY_SESSION_H_ 6 #define NET_SPDY_SPDY_SESSION_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <list> 10 #include <list>
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 void CloseSessionOnError(net::Error err, bool remove_from_pool); 155 void CloseSessionOnError(net::Error err, bool remove_from_pool);
156 156
157 // Indicates whether the session is being reused after having successfully 157 // Indicates whether the session is being reused after having successfully
158 // used to send/receive data in the past. 158 // used to send/receive data in the past.
159 bool IsReused() const { 159 bool IsReused() const {
160 return frames_received_ > 0; 160 return frames_received_ > 0;
161 } 161 }
162 162
163 void set_in_session_pool(bool val) { in_session_pool_ = val; } 163 void set_in_session_pool(bool val) { in_session_pool_ = val; }
164 164
165 // Access to the number of active and pending streams. These are primarily
166 // available for testing and diagnostics.
167 size_t num_active_streams() const { return active_streams_.size(); }
168 size_t num_unclaimed_pushed_streams() const {
169 return unclaimed_pushed_streams_.size();
170 }
171
165 private: 172 private:
166 friend class base::RefCounted<SpdySession>; 173 friend class base::RefCounted<SpdySession>;
167 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, GetActivePushStream); 174 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, GetActivePushStream);
168 175
169 enum State { 176 enum State {
170 IDLE, 177 IDLE,
171 CONNECTING, 178 CONNECTING,
172 CONNECTED, 179 CONNECTED,
173 CLOSED 180 CLOSED
174 }; 181 };
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 368
362 BoundNetLog net_log_; 369 BoundNetLog net_log_;
363 370
364 static bool use_ssl_; 371 static bool use_ssl_;
365 static bool use_flow_control_; 372 static bool use_flow_control_;
366 }; 373 };
367 374
368 } // namespace net 375 } // namespace net
369 376
370 #endif // NET_SPDY_SPDY_SESSION_H_ 377 #endif // NET_SPDY_SPDY_SESSION_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698