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

Unified Diff: remoting/host/native_messaging/native_messaging_pipe.h

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.h
diff --git a/remoting/host/native_messaging/native_messaging_pipe.h b/remoting/host/native_messaging/native_messaging_pipe.h
index 8524a1a6d79ec126afb0af30252e12a0734b2b5c..b42093124413ee1434b840657bc857e378a3c50e 100644
--- a/remoting/host/native_messaging/native_messaging_pipe.h
+++ b/remoting/host/native_messaging/native_messaging_pipe.h
@@ -5,8 +5,9 @@
#ifndef REMOTING_HOST_NATIVE_MESSAGING_NATIVE_MESSAGING_PIPE_H_
#define REMOTING_HOST_NATIVE_MESSAGING_NATIVE_MESSAGING_PIPE_H_
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "extensions/browser/api/messaging/native_message_host.h"
#include "extensions/browser/api/messaging/native_messaging_channel.h"
@@ -26,20 +27,20 @@ class NativeMessagingPipe
~NativeMessagingPipe() override;
// Starts processing messages from the pipe.
- void Start(scoped_ptr<extensions::NativeMessageHost> host,
- scoped_ptr<extensions::NativeMessagingChannel> channel);
+ void Start(std::unique_ptr<extensions::NativeMessageHost> host,
+ std::unique_ptr<extensions::NativeMessagingChannel> channel);
// extensions::NativeMessageHost::Client implementation.
void PostMessageFromNativeHost(const std::string& message) override;
void CloseChannel(const std::string& error_message) override;
// extensions::NativeMessagingChannel::EventHandler implementation.
- void OnMessage(scoped_ptr<base::Value> message) override;
+ void OnMessage(std::unique_ptr<base::Value> message) override;
void OnDisconnect() override;
private:
- scoped_ptr<extensions::NativeMessagingChannel> channel_;
- scoped_ptr<extensions::NativeMessageHost> host_;
+ std::unique_ptr<extensions::NativeMessagingChannel> channel_;
+ std::unique_ptr<extensions::NativeMessageHost> host_;
DISALLOW_COPY_AND_ASSIGN(NativeMessagingPipe);
};
« no previous file with comments | « remoting/host/native_messaging/log_message_handler.cc ('k') | remoting/host/native_messaging/native_messaging_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698