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

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

Issue 8230037: Send PING to check the status of the SPDY connection. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_HTTP_STREAM_H_ 5 #ifndef NET_SPDY_SPDY_HTTP_STREAM_H_
6 #define NET_SPDY_SPDY_HTTP_STREAM_H_ 6 #define NET_SPDY_SPDY_HTTP_STREAM_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <string> 10 #include <string>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 base::Time response_time, 79 base::Time response_time,
80 int status) OVERRIDE; 80 int status) OVERRIDE;
81 virtual void OnDataReceived(const char* buffer, int bytes) OVERRIDE; 81 virtual void OnDataReceived(const char* buffer, int bytes) OVERRIDE;
82 virtual void OnDataSent(int length) OVERRIDE; 82 virtual void OnDataSent(int length) OVERRIDE;
83 virtual void OnClose(int status) OVERRIDE; 83 virtual void OnClose(int status) OVERRIDE;
84 virtual void set_chunk_callback(ChunkCallback* callback) OVERRIDE; 84 virtual void set_chunk_callback(ChunkCallback* callback) OVERRIDE;
85 85
86 private: 86 private:
87 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, FlowControlStallResume); 87 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, FlowControlStallResume);
88 88
89 void CheckPingResponse();
90
89 // Call the user callback. 91 // Call the user callback.
90 void DoCallback(int rv); 92 void DoCallback(int rv);
91 93
92 void ScheduleBufferedReadCallback(); 94 void ScheduleBufferedReadCallback();
93 95
94 // Returns true if the callback is invoked. 96 // Returns true if the callback is invoked.
95 bool DoBufferedReadCallback(); 97 bool DoBufferedReadCallback();
96 bool ShouldWaitForMoreBufferedData() const; 98 bool ShouldWaitForMoreBufferedData() const;
97 99
98 ScopedRunnableMethodFactory<SpdyHttpStream> read_callback_factory_; 100 ScopedRunnableMethodFactory<SpdyHttpStream> read_callback_factory_;
101 ScopedRunnableMethodFactory<SpdyHttpStream> ping_method_factory_;
99 scoped_refptr<SpdyStream> stream_; 102 scoped_refptr<SpdyStream> stream_;
100 scoped_refptr<SpdySession> spdy_session_; 103 scoped_refptr<SpdySession> spdy_session_;
101 104
102 // The request to send. 105 // The request to send.
103 const HttpRequestInfo* request_info_; 106 const HttpRequestInfo* request_info_;
104 107
105 scoped_ptr<UploadDataStream> request_body_stream_; 108 scoped_ptr<UploadDataStream> request_body_stream_;
106 109
107 // |response_info_| is the HTTP response data object which is filled in 110 // |response_info_| is the HTTP response data object which is filled in
108 // when a SYN_REPLY comes in for the stream. 111 // when a SYN_REPLY comes in for the stream.
(...skipping 25 matching lines...) Expand all
134 bool direct_; 137 bool direct_;
135 138
136 bool send_last_chunk_; 139 bool send_last_chunk_;
137 140
138 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); 141 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream);
139 }; 142 };
140 143
141 } // namespace net 144 } // namespace net
142 145
143 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ 146 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698