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

Unified Diff: remoting/host/native_messaging/native_messaging_pipe.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
Index: remoting/host/native_messaging/native_messaging_pipe.cc
diff --git a/remoting/host/native_messaging/native_messaging_pipe.cc b/remoting/host/native_messaging/native_messaging_pipe.cc
index d19dde5de008ad4fa5253482a6321b61cd30697a..27128a1b66ba45f0a90f151093e031c825430366 100644
--- a/remoting/host/native_messaging/native_messaging_pipe.cc
+++ b/remoting/host/native_messaging/native_messaging_pipe.cc
@@ -17,14 +17,14 @@ NativeMessagingPipe::NativeMessagingPipe() {}
NativeMessagingPipe::~NativeMessagingPipe() {}
void NativeMessagingPipe::Start(
- scoped_ptr<extensions::NativeMessageHost> host,
- scoped_ptr<extensions::NativeMessagingChannel> channel) {
+ std::unique_ptr<extensions::NativeMessageHost> host,
+ std::unique_ptr<extensions::NativeMessagingChannel> channel) {
host_ = std::move(host);
channel_ = std::move(channel);
channel_->Start(this);
}
-void NativeMessagingPipe::OnMessage(scoped_ptr<base::Value> message) {
+void NativeMessagingPipe::OnMessage(std::unique_ptr<base::Value> message) {
std::string message_json;
base::JSONWriter::Write(*message, &message_json);
host_->OnMessage(message_json);
@@ -37,7 +37,7 @@ void NativeMessagingPipe::OnDisconnect() {
void NativeMessagingPipe::PostMessageFromNativeHost(
const std::string& message) {
- scoped_ptr<base::Value> json = base::JSONReader::Read(message);
+ std::unique_ptr<base::Value> json = base::JSONReader::Read(message);
channel_->SendMessage(std::move(json));
}
« no previous file with comments | « remoting/host/native_messaging/native_messaging_pipe.h ('k') | remoting/host/native_messaging/native_messaging_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698