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

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

Issue 15555003: [SPDY] Remove SpdyStream::Delegate::OnSendBody()'s return value (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 7 years, 7 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_session_spdy3_unittest.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) 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_STREAM_H_ 5 #ifndef NET_SPDY_SPDY_STREAM_H_
6 #define NET_SPDY_SPDY_STREAM_H_ 6 #define NET_SPDY_SPDY_STREAM_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 public: 53 public:
54 // Delegate handles protocol specific behavior of spdy stream. 54 // Delegate handles protocol specific behavior of spdy stream.
55 class NET_EXPORT_PRIVATE Delegate { 55 class NET_EXPORT_PRIVATE Delegate {
56 public: 56 public:
57 Delegate() {} 57 Delegate() {}
58 58
59 // Called when SYN frame has been sent. 59 // Called when SYN frame has been sent.
60 // Returns true if no more data to be sent after SYN frame. 60 // Returns true if no more data to be sent after SYN frame.
61 virtual SpdySendStatus OnSendHeadersComplete() = 0; 61 virtual SpdySendStatus OnSendHeadersComplete() = 0;
62 62
63 // Called when stream is ready to send data. 63 // Called when the stream is ready to send body data. The
64 // Returns network error code. OK when it successfully sent data. 64 // delegate must call QueueStreamData() on the stream, either
65 // ERR_IO_PENDING when performing operation asynchronously. 65 // immediately or asynchronously (e.g., if the data to be send has
66 virtual int OnSendBody() = 0; 66 // to be read asynchronously).
67 //
68 // Called only when OnSendHeadersComplete() or
69 // OnSendBodyComplete() returns MORE_DATA_TO_SEND.
70 virtual void OnSendBody() = 0;
67 71
68 // Called when body data has been sent. |bytes_sent| is the number 72 // Called when body data has been sent. |bytes_sent| is the number
69 // of bytes that has been sent (may be zero). Must return whether 73 // of bytes that has been sent (may be zero). Must return whether
70 // there's more body data to send. 74 // there's more body data to send.
71 virtual SpdySendStatus OnSendBodyComplete(size_t bytes_sent) = 0; 75 virtual SpdySendStatus OnSendBodyComplete(size_t bytes_sent) = 0;
72 76
73 // Called when the SYN_STREAM, SYN_REPLY, or HEADERS frames are received. 77 // Called when the SYN_STREAM, SYN_REPLY, or HEADERS frames are received.
74 // Normal streams will receive a SYN_REPLY and optional HEADERS frames. 78 // Normal streams will receive a SYN_REPLY and optional HEADERS frames.
75 // Pushed streams will receive a SYN_STREAM and optional HEADERS frames. 79 // Pushed streams will receive a SYN_STREAM and optional HEADERS frames.
76 // Because a stream may have a SYN_* frame and multiple HEADERS frames, 80 // Because a stream may have a SYN_* frame and multiple HEADERS frames,
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 // When OnFrameWriteComplete() is called, these variables are set. 461 // When OnFrameWriteComplete() is called, these variables are set.
458 SpdyFrameType just_completed_frame_type_; 462 SpdyFrameType just_completed_frame_type_;
459 size_t just_completed_frame_size_; 463 size_t just_completed_frame_size_;
460 464
461 DISALLOW_COPY_AND_ASSIGN(SpdyStream); 465 DISALLOW_COPY_AND_ASSIGN(SpdyStream);
462 }; 466 };
463 467
464 } // namespace net 468 } // namespace net
465 469
466 #endif // NET_SPDY_SPDY_STREAM_H_ 470 #endif // NET_SPDY_SPDY_STREAM_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_spdy3_unittest.cc ('k') | net/spdy/spdy_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698