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

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

Issue 1180373004: Cleanup: Remove various DoNothing functions and use base::DoNothing(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
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/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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 TestCompletionCallback callback_; 81 TestCompletionCallback callback_;
82 bool send_headers_completed_; 82 bool send_headers_completed_;
83 SpdyHeaderBlock response_headers_; 83 SpdyHeaderBlock response_headers_;
84 SpdyReadQueue received_data_queue_; 84 SpdyReadQueue received_data_queue_;
85 }; 85 };
86 86
87 // Test delegate that does nothing. Used to capture data about the 87 // Test delegate that does nothing. Used to capture data about the
88 // stream, e.g. its id when it was open. 88 // stream, e.g. its id when it was open.
89 class StreamDelegateDoNothing : public StreamDelegateBase { 89 class StreamDelegateDoNothing : public StreamDelegateBase {
90 public: 90 public:
91 StreamDelegateDoNothing(const base::WeakPtr<SpdyStream>& stream); 91 explicit StreamDelegateDoNothing(const base::WeakPtr<SpdyStream>& stream);
92 ~StreamDelegateDoNothing() override; 92 ~StreamDelegateDoNothing() override;
93 }; 93 };
94 94
95 // Test delegate that sends data immediately in OnResponseHeadersUpdated(). 95 // Test delegate that sends data immediately in OnResponseHeadersUpdated().
96 class StreamDelegateSendImmediate : public StreamDelegateBase { 96 class StreamDelegateSendImmediate : public StreamDelegateBase {
97 public: 97 public:
98 // |data| can be NULL. 98 // |data| can be NULL.
99 StreamDelegateSendImmediate(const base::WeakPtr<SpdyStream>& stream, 99 StreamDelegateSendImmediate(const base::WeakPtr<SpdyStream>& stream,
100 base::StringPiece data); 100 base::StringPiece data);
101 ~StreamDelegateSendImmediate() override; 101 ~StreamDelegateSendImmediate() override;
(...skipping 14 matching lines...) Expand all
116 116
117 void OnRequestHeadersSent() override; 117 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(). 123 // Test delegate that closes stream in OnResponseHeadersUpdated().
124 class StreamDelegateCloseOnHeaders : public StreamDelegateBase { 124 class StreamDelegateCloseOnHeaders : public StreamDelegateBase {
125 public: 125 public:
126 StreamDelegateCloseOnHeaders(const base::WeakPtr<SpdyStream>& stream); 126 explicit StreamDelegateCloseOnHeaders(
127 const base::WeakPtr<SpdyStream>& stream);
127 ~StreamDelegateCloseOnHeaders() override; 128 ~StreamDelegateCloseOnHeaders() override;
128 129
129 SpdyResponseHeadersStatus OnResponseHeadersUpdated( 130 SpdyResponseHeadersStatus OnResponseHeadersUpdated(
130 const SpdyHeaderBlock& response_headers) override; 131 const SpdyHeaderBlock& response_headers) override;
131 }; 132 };
132 133
133 } // namespace test 134 } // namespace test
134 135
135 } // namespace net 136 } // namespace net
136 137
137 #endif // NET_SPDY_SPDY_STREAM_TEST_UTIL_H_ 138 #endif // NET_SPDY_SPDY_STREAM_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698