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

Unified Diff: chrome/browser/extensions/api/messaging/native_message_port.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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: chrome/browser/extensions/api/messaging/native_message_port.cc
diff --git a/chrome/browser/extensions/api/messaging/native_message_port.cc b/chrome/browser/extensions/api/messaging/native_message_port.cc
index dc97cf83018edb61ab752fb3fac294c4476efc5c..7ed697ec36d5490504dd19b82707451f75c60a4d 100644
--- a/chrome/browser/extensions/api/messaging/native_message_port.cc
+++ b/chrome/browser/extensions/api/messaging/native_message_port.cc
@@ -22,7 +22,7 @@ namespace extensions {
class NativeMessagePort::Core : public NativeMessageHost::Client {
public:
Core(
- scoped_ptr<NativeMessageHost> host,
+ std::unique_ptr<NativeMessageHost> host,
base::WeakPtr<NativeMessagePort> port,
scoped_refptr<base::SingleThreadTaskRunner> message_service_task_runner_);
~Core() override;
@@ -34,7 +34,7 @@ class NativeMessagePort::Core : public NativeMessageHost::Client {
void CloseChannel(const std::string& error_message) override;
private:
- scoped_ptr<NativeMessageHost> host_;
+ std::unique_ptr<NativeMessageHost> host_;
base::WeakPtr<NativeMessagePort> port_;
scoped_refptr<base::SingleThreadTaskRunner> message_service_task_runner_;
@@ -42,7 +42,7 @@ class NativeMessagePort::Core : public NativeMessageHost::Client {
};
NativeMessagePort::Core::Core(
- scoped_ptr<NativeMessageHost> host,
+ std::unique_ptr<NativeMessageHost> host,
base::WeakPtr<NativeMessagePort> port,
scoped_refptr<base::SingleThreadTaskRunner> message_service_task_runner)
: host_(std::move(host)),
@@ -87,7 +87,7 @@ void NativeMessagePort::Core::CloseChannel(const std::string& error_message) {
NativeMessagePort::NativeMessagePort(
base::WeakPtr<MessageService> message_service,
int port_id,
- scoped_ptr<NativeMessageHost> native_message_host)
+ std::unique_ptr<NativeMessageHost> native_message_host)
: weak_message_service_(message_service),
host_task_runner_(native_message_host->task_runner()),
port_id_(port_id),

Powered by Google App Engine
This is Rietveld 408576698