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

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

Issue 10828129: SPDY: WriteHeaders should not invoke OnDataSent callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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_stream_spdy3_unittest.cc ('k') | net/spdy/spdy_stream_test_util.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_TEST_UTIL_H_ 5 #ifndef NET_SPDY_SPDY_STREAM_TEST_UTIL_H_
6 #define NET_SPDY_SPDY_STREAM_TEST_UTIL_H_ 6 #define NET_SPDY_SPDY_STREAM_TEST_UTIL_H_
7 7
8 #include "base/memory/linked_ptr.h" 8 #include "base/memory/linked_ptr.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "net/base/completion_callback.h" 10 #include "net/base/completion_callback.h"
(...skipping 10 matching lines...) Expand all
21 IOBufferWithSize* buf, 21 IOBufferWithSize* buf,
22 const CompletionCallback& callback); 22 const CompletionCallback& callback);
23 virtual ~TestSpdyStreamDelegate(); 23 virtual ~TestSpdyStreamDelegate();
24 24
25 virtual bool OnSendHeadersComplete(int status) OVERRIDE; 25 virtual bool OnSendHeadersComplete(int status) OVERRIDE;
26 virtual int OnSendBody() OVERRIDE; 26 virtual int OnSendBody() OVERRIDE;
27 virtual int OnSendBodyComplete(int status, bool* eof) OVERRIDE; 27 virtual int OnSendBodyComplete(int status, bool* eof) OVERRIDE;
28 virtual int OnResponseReceived(const SpdyHeaderBlock& response, 28 virtual int OnResponseReceived(const SpdyHeaderBlock& response,
29 base::Time response_time, 29 base::Time response_time,
30 int status) OVERRIDE; 30 int status) OVERRIDE;
31 virtual void OnHeadersSent() OVERRIDE;
31 virtual int OnDataReceived(const char* buffer, int bytes) OVERRIDE; 32 virtual int OnDataReceived(const char* buffer, int bytes) OVERRIDE;
32 virtual void OnDataSent(int length) OVERRIDE; 33 virtual void OnDataSent(int length) OVERRIDE;
33 virtual void OnClose(int status) OVERRIDE; 34 virtual void OnClose(int status) OVERRIDE;
34 35
35 bool send_headers_completed() const { return send_headers_completed_; } 36 bool send_headers_completed() const { return send_headers_completed_; }
36 const linked_ptr<SpdyHeaderBlock>& response() const { 37 const linked_ptr<SpdyHeaderBlock>& response() const {
37 return response_; 38 return response_;
38 } 39 }
39 const std::string& received_data() const { return received_data_; } 40 const std::string& received_data() const { return received_data_; }
41 int headers_sent() const { return headers_sent_; }
40 int data_sent() const { return data_sent_; } 42 int data_sent() const { return data_sent_; }
41 bool closed() const { return closed_; } 43 bool closed() const { return closed_; }
42 44
43 private: 45 private:
44 SpdyStream* stream_; 46 SpdyStream* stream_;
45 scoped_ptr<SpdyHeaderBlock> headers_; 47 scoped_ptr<SpdyHeaderBlock> headers_;
46 scoped_refptr<IOBufferWithSize> buf_; 48 scoped_refptr<IOBufferWithSize> buf_;
47 CompletionCallback callback_; 49 CompletionCallback callback_;
48 bool send_headers_completed_; 50 bool send_headers_completed_;
49 linked_ptr<SpdyHeaderBlock> response_; 51 linked_ptr<SpdyHeaderBlock> response_;
50 std::string received_data_; 52 std::string received_data_;
53 int headers_sent_;
51 int data_sent_; 54 int data_sent_;
52 bool closed_; 55 bool closed_;
53 56
54 }; 57 };
55 58
56 } // namespace test 59 } // namespace test
57 60
58 } // namespace net 61 } // namespace net
59 62
60 #endif // NET_SPDY_SPDY_STREAM_TEST_UTIL_H_ 63 #endif // NET_SPDY_SPDY_STREAM_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream_spdy3_unittest.cc ('k') | net/spdy/spdy_stream_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698