| OLD | NEW |
| 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/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 StreamDelegateWithBody(const base::WeakPtr<SpdyStream>& stream, | 113 StreamDelegateWithBody(const base::WeakPtr<SpdyStream>& stream, |
| 114 base::StringPiece data); | 114 base::StringPiece data); |
| 115 virtual ~StreamDelegateWithBody(); | 115 virtual ~StreamDelegateWithBody(); |
| 116 | 116 |
| 117 virtual void OnRequestHeadersSent() OVERRIDE; | 117 virtual void OnRequestHeadersSent() OVERRIDE; |
| 118 | 118 |
| 119 private: | 119 private: |
| 120 scoped_refptr<StringIOBuffer> buf_; | 120 scoped_refptr<StringIOBuffer> buf_; |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 // Test delegate that closes stream in OnResponseHeadersUpdated(). |
| 124 class StreamDelegateCloseOnHeaders : public StreamDelegateBase { |
| 125 public: |
| 126 StreamDelegateCloseOnHeaders(const base::WeakPtr<SpdyStream>& stream); |
| 127 virtual ~StreamDelegateCloseOnHeaders(); |
| 128 |
| 129 virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated( |
| 130 const SpdyHeaderBlock& response_headers) OVERRIDE; |
| 131 }; |
| 132 |
| 123 } // namespace test | 133 } // namespace test |
| 124 | 134 |
| 125 } // namespace net | 135 } // namespace net |
| 126 | 136 |
| 127 #endif // NET_SPDY_SPDY_STREAM_TEST_UTIL_H_ | 137 #endif // NET_SPDY_SPDY_STREAM_TEST_UTIL_H_ |
| OLD | NEW |