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

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

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « net/spdy/spdy_stream.cc ('k') | net/spdy/spdy_stream_unittest.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 #include "net/spdy/spdy_stream_test_util.h" 5 #include "net/spdy/spdy_stream_test_util.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <utility>
8 9
9 #include "base/stl_util.h" 10 #include "base/stl_util.h"
10 #include "net/base/completion_callback.h" 11 #include "net/base/completion_callback.h"
11 #include "net/spdy/spdy_stream.h" 12 #include "net/spdy/spdy_stream.h"
12 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
13 14
14 namespace net { 15 namespace net {
15 16
16 namespace test { 17 namespace test {
17 18
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 60
60 SpdyResponseHeadersStatus StreamDelegateBase::OnResponseHeadersUpdated( 61 SpdyResponseHeadersStatus StreamDelegateBase::OnResponseHeadersUpdated(
61 const SpdyHeaderBlock& response_headers) { 62 const SpdyHeaderBlock& response_headers) {
62 EXPECT_EQ(stream_->type() != SPDY_PUSH_STREAM, send_headers_completed_); 63 EXPECT_EQ(stream_->type() != SPDY_PUSH_STREAM, send_headers_completed_);
63 response_headers_ = response_headers; 64 response_headers_ = response_headers;
64 return RESPONSE_HEADERS_ARE_COMPLETE; 65 return RESPONSE_HEADERS_ARE_COMPLETE;
65 } 66 }
66 67
67 void StreamDelegateBase::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) { 68 void StreamDelegateBase::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {
68 if (buffer) 69 if (buffer)
69 received_data_queue_.Enqueue(buffer.Pass()); 70 received_data_queue_.Enqueue(std::move(buffer));
70 } 71 }
71 72
72 void StreamDelegateBase::OnDataSent() {} 73 void StreamDelegateBase::OnDataSent() {}
73 74
74 void StreamDelegateBase::OnTrailers(const SpdyHeaderBlock& trailers) {} 75 void StreamDelegateBase::OnTrailers(const SpdyHeaderBlock& trailers) {}
75 76
76 void StreamDelegateBase::OnClose(int status) { 77 void StreamDelegateBase::OnClose(int status) {
77 if (!stream_.get()) 78 if (!stream_.get())
78 return; 79 return;
79 stream_id_ = stream_->stream_id(); 80 stream_id_ = stream_->stream_id();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 SpdyResponseHeadersStatus 158 SpdyResponseHeadersStatus
158 StreamDelegateCloseOnHeaders::OnResponseHeadersUpdated( 159 StreamDelegateCloseOnHeaders::OnResponseHeadersUpdated(
159 const SpdyHeaderBlock& response_headers) { 160 const SpdyHeaderBlock& response_headers) {
160 stream()->Cancel(); 161 stream()->Cancel();
161 return RESPONSE_HEADERS_ARE_COMPLETE; 162 return RESPONSE_HEADERS_ARE_COMPLETE;
162 } 163 }
163 164
164 } // namespace test 165 } // namespace test
165 166
166 } // namespace net 167 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream.cc ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698