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

Unified Diff: net/websockets/websocket_basic_stream.cc

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/websockets/websocket_basic_handshake_stream.cc ('k') | net/websockets/websocket_basic_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_basic_stream.cc
diff --git a/net/websockets/websocket_basic_stream.cc b/net/websockets/websocket_basic_stream.cc
index 29fe581b19d1fc16d2deed91c4f7a3881642a846..c54ef71611edf029604e348746789e474998c2bc 100644
--- a/net/websockets/websocket_basic_stream.cc
+++ b/net/websockets/websocket_basic_stream.cc
@@ -72,7 +72,7 @@ WebSocketBasicStream::WebSocketBasicStream(
const std::string& sub_protocol,
const std::string& extensions)
: read_buffer_(new IOBufferWithSize(kReadBufferSize)),
- connection_(connection.Pass()),
+ connection_(std::move(connection)),
http_read_buffer_(http_read_buffer),
sub_protocol_(sub_protocol),
extensions_(extensions),
@@ -192,9 +192,9 @@ WebSocketBasicStream::CreateWebSocketBasicStreamForTesting(
const std::string& extensions,
WebSocketMaskingKeyGeneratorFunction key_generator_function) {
scoped_ptr<WebSocketBasicStream> stream(new WebSocketBasicStream(
- connection.Pass(), http_read_buffer, sub_protocol, extensions));
+ std::move(connection), http_read_buffer, sub_protocol, extensions));
stream->generate_websocket_masking_key_ = key_generator_function;
- return stream.Pass();
+ return stream;
}
int WebSocketBasicStream::WriteEverything(
@@ -262,7 +262,7 @@ int WebSocketBasicStream::ConvertChunksToFrames(
if (result != OK)
return result;
if (frame)
- frames->push_back(frame.Pass());
+ frames->push_back(std::move(frame));
}
frame_chunks->clear();
if (frames->empty())
@@ -390,7 +390,7 @@ scoped_ptr<WebSocketFrame> WebSocketBasicStream::CreateFrame(
// belong to it.
if (is_final_chunk)
current_frame_header_.reset();
- return result_frame.Pass();
+ return result_frame;
}
void WebSocketBasicStream::AddToIncompleteControlFrameBody(
« no previous file with comments | « net/websockets/websocket_basic_handshake_stream.cc ('k') | net/websockets/websocket_basic_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698