| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "net/base/io_buffer.h" | 12 #include "net/base/io_buffer.h" |
| 13 #include "net/base/test_completion_callback.h" | 13 #include "net/base/test_completion_callback.h" |
| 14 #include "net/log/net_log_source.h" | 14 #include "net/log/net_log_source.h" |
| 15 #include "net/spdy/chromium/spdy_read_queue.h" |
| 16 #include "net/spdy/chromium/spdy_stream.h" |
| 15 #include "net/spdy/platform/api/spdy_string_piece.h" | 17 #include "net/spdy/platform/api/spdy_string_piece.h" |
| 16 #include "net/spdy/spdy_read_queue.h" | |
| 17 #include "net/spdy/spdy_stream.h" | |
| 18 | 18 |
| 19 namespace net { | 19 namespace net { |
| 20 | 20 |
| 21 namespace test { | 21 namespace test { |
| 22 | 22 |
| 23 // Delegate that calls Close() on |stream_| on OnClose. Used by tests | 23 // Delegate that calls Close() on |stream_| on OnClose. Used by tests |
| 24 // to make sure that such an action is harmless. | 24 // to make sure that such an action is harmless. |
| 25 class ClosingDelegate : public SpdyStream::Delegate { | 25 class ClosingDelegate : public SpdyStream::Delegate { |
| 26 public: | 26 public: |
| 27 explicit ClosingDelegate(const base::WeakPtr<SpdyStream>& stream); | 27 explicit ClosingDelegate(const base::WeakPtr<SpdyStream>& stream); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 ~StreamDelegateCloseOnHeaders() override; | 131 ~StreamDelegateCloseOnHeaders() override; |
| 132 | 132 |
| 133 void OnHeadersReceived(const SpdyHeaderBlock& response_headers) override; | 133 void OnHeadersReceived(const SpdyHeaderBlock& response_headers) override; |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace test | 136 } // namespace test |
| 137 | 137 |
| 138 } // namespace net | 138 } // namespace net |
| 139 | 139 |
| 140 #endif // NET_SPDY_SPDY_STREAM_TEST_UTIL_H_ | 140 #endif // NET_SPDY_SPDY_STREAM_TEST_UTIL_H_ |
| OLD | NEW |