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

Unified Diff: remoting/protocol/message_reader.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/message_reader.h ('k') | remoting/protocol/message_reader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/message_reader.cc
diff --git a/remoting/protocol/message_reader.cc b/remoting/protocol/message_reader.cc
index 3516595e85330a03ccbe436ef6f652c3e6a6b0e8..fb3400159d98dcc161c04f3d0eb89ed2e40f7606 100644
--- a/remoting/protocol/message_reader.cc
+++ b/remoting/protocol/message_reader.cc
@@ -10,8 +10,9 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/location.h"
-#include "base/thread_task_runner_handle.h"
+#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "remoting/base/compound_buffer.h"
@@ -108,11 +109,11 @@ void MessageReader::OnDataReceived(net::IOBuffer* data, int data_size) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&MessageReader::RunCallback, weak_factory_.GetWeakPtr(),
- base::Passed(make_scoped_ptr(buffer))));
+ base::Passed(base::WrapUnique(buffer))));
}
}
-void MessageReader::RunCallback(scoped_ptr<CompoundBuffer> message) {
+void MessageReader::RunCallback(std::unique_ptr<CompoundBuffer> message) {
if (!message_received_callback_.is_null())
message_received_callback_.Run(std::move(message));
}
« no previous file with comments | « remoting/protocol/message_reader.h ('k') | remoting/protocol/message_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698