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

Unified Diff: remoting/host/native_messaging/native_messaging_reader.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_reader.h
diff --git a/remoting/host/native_messaging/native_messaging_reader.h b/remoting/host/native_messaging/native_messaging_reader.h
index f5a090c270c1653a1928674ee593d2256fd0f5f0..482d48fb2c4c6bcdf62de23c08e95a39475a95c9 100644
--- a/remoting/host/native_messaging/native_messaging_reader.h
+++ b/remoting/host/native_messaging/native_messaging_reader.h
@@ -5,10 +5,11 @@
#ifndef REMOTING_HOST_NATIVE_MESSAGING_NATIVE_MESSAGING_READER_H_
#define REMOTING_HOST_NATIVE_MESSAGING_NATIVE_MESSAGING_READER_H_
+#include <memory>
+
#include "base/callback.h"
#include "base/files/file.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread.h"
@@ -23,7 +24,7 @@ namespace remoting {
// webapp.
class NativeMessagingReader {
public:
- typedef base::Callback<void(scoped_ptr<base::Value>)> MessageCallback;
+ typedef base::Callback<void(std::unique_ptr<base::Value>)> MessageCallback;
explicit NativeMessagingReader(base::File file);
~NativeMessagingReader();
@@ -42,13 +43,13 @@ class NativeMessagingReader {
// Wrappers posted to by the read thread to trigger the message and EOF
// callbacks on the caller thread, and have them safely dropped if the reader
// has been deleted before they are processed.
- void InvokeMessageCallback(scoped_ptr<base::Value> message);
+ void InvokeMessageCallback(std::unique_ptr<base::Value> message);
void InvokeEofCallback();
// Holds the information that the read thread needs to access, such as the
// File, and the TaskRunner used for posting notifications back to this
// class.
- scoped_ptr<Core> core_;
+ std::unique_ptr<Core> core_;
// Caller-supplied message and end-of-file callbacks.
MessageCallback message_callback_;
« no previous file with comments | « remoting/host/native_messaging/native_messaging_pipe.cc ('k') | remoting/host/native_messaging/native_messaging_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698