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

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

Issue 786123002: Update from https://crrev.com/307330 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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_protocol.h ('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) 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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 void SendPrefacePingIfNoneInFlight(); 722 void SendPrefacePingIfNoneInFlight();
723 723
724 // Send PING if there are no PINGs in flight and we haven't heard from server. 724 // Send PING if there are no PINGs in flight and we haven't heard from server.
725 void SendPrefacePing(); 725 void SendPrefacePing();
726 726
727 // Send a single WINDOW_UPDATE frame. 727 // Send a single WINDOW_UPDATE frame.
728 void SendWindowUpdateFrame(SpdyStreamId stream_id, uint32 delta_window_size, 728 void SendWindowUpdateFrame(SpdyStreamId stream_id, uint32 delta_window_size,
729 RequestPriority priority); 729 RequestPriority priority);
730 730
731 // Send the PING frame. 731 // Send the PING frame.
732 void WritePingFrame(uint32 unique_id, bool is_ack); 732 void WritePingFrame(SpdyPingId unique_id, bool is_ack);
733 733
734 // Post a CheckPingStatus call after delay. Don't post if there is already 734 // Post a CheckPingStatus call after delay. Don't post if there is already
735 // CheckPingStatus running. 735 // CheckPingStatus running.
736 void PlanToCheckPingStatus(); 736 void PlanToCheckPingStatus();
737 737
738 // Check the status of the connection. It calls |CloseSessionOnError| if we 738 // Check the status of the connection. It calls |CloseSessionOnError| if we
739 // haven't received any data in |kHungInterval| time period. 739 // haven't received any data in |kHungInterval| time period.
740 void CheckPingStatus(base::TimeTicks last_check_time); 740 void CheckPingStatus(base::TimeTicks last_check_time);
741 741
742 // Get a new stream id. 742 // Get a new stream id.
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 void set_hung_interval(base::TimeDelta duration) { 941 void set_hung_interval(base::TimeDelta duration) {
942 hung_interval_ = duration; 942 hung_interval_ = duration;
943 } 943 }
944 944
945 void set_max_concurrent_pushed_streams(size_t value) { 945 void set_max_concurrent_pushed_streams(size_t value) {
946 max_concurrent_pushed_streams_ = value; 946 max_concurrent_pushed_streams_ = value;
947 } 947 }
948 948
949 int64 pings_in_flight() const { return pings_in_flight_; } 949 int64 pings_in_flight() const { return pings_in_flight_; }
950 950
951 uint32 next_ping_id() const { return next_ping_id_; } 951 SpdyPingId next_ping_id() const { return next_ping_id_; }
952 952
953 base::TimeTicks last_activity_time() const { return last_activity_time_; } 953 base::TimeTicks last_activity_time() const { return last_activity_time_; }
954 954
955 bool check_ping_status_pending() const { return check_ping_status_pending_; } 955 bool check_ping_status_pending() const { return check_ping_status_pending_; }
956 956
957 size_t max_concurrent_streams() const { return max_concurrent_streams_; } 957 size_t max_concurrent_streams() const { return max_concurrent_streams_; }
958 958
959 // Returns the SSLClientSocket that this SPDY session sits on top of, 959 // Returns the SSLClientSocket that this SPDY session sits on top of,
960 // or NULL, if the transport is not SSL. 960 // or NULL, if the transport is not SSL.
961 SSLClientSocket* GetSSLClientSocket() const; 961 SSLClientSocket* GetSSLClientSocket() const;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 1078
1079 bool sent_settings_; // Did this session send settings when it started. 1079 bool sent_settings_; // Did this session send settings when it started.
1080 bool received_settings_; // Did this session receive at least one settings 1080 bool received_settings_; // Did this session receive at least one settings
1081 // frame. 1081 // frame.
1082 int stalled_streams_; // Count of streams that were ever stalled. 1082 int stalled_streams_; // Count of streams that were ever stalled.
1083 1083
1084 // Count of all pings on the wire, for which we have not gotten a response. 1084 // Count of all pings on the wire, for which we have not gotten a response.
1085 int64 pings_in_flight_; 1085 int64 pings_in_flight_;
1086 1086
1087 // This is the next ping_id (unique_id) to be sent in PING frame. 1087 // This is the next ping_id (unique_id) to be sent in PING frame.
1088 uint32 next_ping_id_; 1088 SpdyPingId next_ping_id_;
1089 1089
1090 // This is the last time we have sent a PING. 1090 // This is the last time we have sent a PING.
1091 base::TimeTicks last_ping_sent_time_; 1091 base::TimeTicks last_ping_sent_time_;
1092 1092
1093 // This is the last time we had activity in the session. 1093 // This is the last time we had activity in the session.
1094 base::TimeTicks last_activity_time_; 1094 base::TimeTicks last_activity_time_;
1095 1095
1096 // This is the length of the last compressed frame. 1096 // This is the length of the last compressed frame.
1097 size_t last_compressed_frame_len_; 1097 size_t last_compressed_frame_len_;
1098 1098
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 // Used for posting asynchronous IO tasks. We use this even though 1175 // Used for posting asynchronous IO tasks. We use this even though
1176 // SpdySession is refcounted because we don't need to keep the SpdySession 1176 // SpdySession is refcounted because we don't need to keep the SpdySession
1177 // alive if the last reference is within a RunnableMethod. Just revoke the 1177 // alive if the last reference is within a RunnableMethod. Just revoke the
1178 // method. 1178 // method.
1179 base::WeakPtrFactory<SpdySession> weak_factory_; 1179 base::WeakPtrFactory<SpdySession> weak_factory_;
1180 }; 1180 };
1181 1181
1182 } // namespace net 1182 } // namespace net
1183 1183
1184 #endif // NET_SPDY_SPDY_SESSION_H_ 1184 #endif // NET_SPDY_SPDY_SESSION_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_protocol.h ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698