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

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

Issue 169643006: Use sockets with unread data if they've never been used before. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweak SpdySession::IsReused (erf, got mixed in with a rebase) Created 6 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // Mark this session as unavailable, meaning that it will not be used to 360 // Mark this session as unavailable, meaning that it will not be used to
361 // service new streams. Unlike when a GOAWAY frame is received, this function 361 // service new streams. Unlike when a GOAWAY frame is received, this function
362 // will not close any streams. 362 // will not close any streams.
363 void MakeUnavailable(); 363 void MakeUnavailable();
364 364
365 // Retrieves information on the current state of the SPDY session as a 365 // Retrieves information on the current state of the SPDY session as a
366 // Value. Caller takes possession of the returned value. 366 // Value. Caller takes possession of the returned value.
367 base::Value* GetInfoAsValue() const; 367 base::Value* GetInfoAsValue() const;
368 368
369 // Indicates whether the session is being reused after having successfully 369 // Indicates whether the session is being reused after having successfully
370 // used to send/receive data in the past. 370 // used to send/receive data in the past or if the underlying socket was idle
371 // before being used for a SPDY session.
371 bool IsReused() const; 372 bool IsReused() const;
372 373
373 // Returns true if the underlying transport socket ever had any reads or 374 // Returns true if the underlying transport socket ever had any reads or
374 // writes. 375 // writes.
375 bool WasEverUsed() const { 376 bool WasEverUsed() const {
376 return connection_->socket()->WasEverUsed(); 377 return connection_->socket()->WasEverUsed();
377 } 378 }
378 379
379 // Returns the load timing information from the perspective of the given 380 // Returns the load timing information from the perspective of the given
380 // stream. If it's not the first stream, the connection is considered reused 381 // stream. If it's not the first stream, the connection is considered reused
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 // This SPDY proxy is allowed to push resources from origins that are 1121 // This SPDY proxy is allowed to push resources from origins that are
1121 // different from those of their associated streams. 1122 // different from those of their associated streams.
1122 HostPortPair trusted_spdy_proxy_; 1123 HostPortPair trusted_spdy_proxy_;
1123 1124
1124 TimeFunc time_func_; 1125 TimeFunc time_func_;
1125 }; 1126 };
1126 1127
1127 } // namespace net 1128 } // namespace net
1128 1129
1129 #endif // NET_SPDY_SPDY_SESSION_H_ 1130 #endif // NET_SPDY_SPDY_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698