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

Unified Diff: extensions/browser/api/serial/serial_event_dispatcher.cc

Issue 1902873002: Convert //extensions/browser/api from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: extensions/browser/api/serial/serial_event_dispatcher.cc
diff --git a/extensions/browser/api/serial/serial_event_dispatcher.cc b/extensions/browser/api/serial/serial_event_dispatcher.cc
index 31e44b041b0b7dcfae04a975ff19955b09851218..31fb191d904f949e510157b6835662ed94bda964 100644
--- a/extensions/browser/api/serial/serial_event_dispatcher.cc
+++ b/extensions/browser/api/serial/serial_event_dispatcher.cc
@@ -107,8 +107,9 @@ void SerialEventDispatcher::ReceiveCallback(const ReceiveParams& params,
serial::ReceiveInfo receive_info;
receive_info.connection_id = params.connection_id;
receive_info.data = data;
- scoped_ptr<base::ListValue> args = serial::OnReceive::Create(receive_info);
- scoped_ptr<extensions::Event> event(
+ std::unique_ptr<base::ListValue> args =
+ serial::OnReceive::Create(receive_info);
+ std::unique_ptr<extensions::Event> event(
new extensions::Event(extensions::events::SERIAL_ON_RECEIVE,
serial::OnReceive::kEventName, std::move(args)));
PostEvent(params, std::move(event));
@@ -118,9 +119,9 @@ void SerialEventDispatcher::ReceiveCallback(const ReceiveParams& params,
serial::ReceiveErrorInfo error_info;
error_info.connection_id = params.connection_id;
error_info.error = error;
- scoped_ptr<base::ListValue> args =
+ std::unique_ptr<base::ListValue> args =
serial::OnReceiveError::Create(error_info);
- scoped_ptr<extensions::Event> event(new extensions::Event(
+ std::unique_ptr<extensions::Event> event(new extensions::Event(
extensions::events::SERIAL_ON_RECEIVE_ERROR,
serial::OnReceiveError::kEventName, std::move(args)));
PostEvent(params, std::move(event));
@@ -138,8 +139,9 @@ void SerialEventDispatcher::ReceiveCallback(const ReceiveParams& params,
}
// static
-void SerialEventDispatcher::PostEvent(const ReceiveParams& params,
- scoped_ptr<extensions::Event> event) {
+void SerialEventDispatcher::PostEvent(
+ const ReceiveParams& params,
+ std::unique_ptr<extensions::Event> event) {
DCHECK_CURRENTLY_ON(params.thread_id);
BrowserThread::PostTask(
@@ -149,9 +151,10 @@ void SerialEventDispatcher::PostEvent(const ReceiveParams& params,
}
// static
-void SerialEventDispatcher::DispatchEvent(void* browser_context_id,
- const std::string& extension_id,
- scoped_ptr<extensions::Event> event) {
+void SerialEventDispatcher::DispatchEvent(
+ void* browser_context_id,
+ const std::string& extension_id,
+ std::unique_ptr<extensions::Event> event) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
content::BrowserContext* context =
« no previous file with comments | « extensions/browser/api/serial/serial_event_dispatcher.h ('k') | extensions/browser/api/socket/app_firewall_hole_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698