| Index: extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc
|
| diff --git a/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc b/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc
|
| index d6185dbba1fce9520a9b2129fe3d1366288f939b..145a288825dd97e426d6dbe9eb908c26a7509331 100644
|
| --- a/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc
|
| +++ b/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc
|
| @@ -197,11 +197,11 @@ void BluetoothSocketEventDispatcher::ReceiveCallback(
|
| bluetooth_socket::ReceiveInfo receive_info;
|
| receive_info.socket_id = params.socket_id;
|
| receive_info.data.assign(io_buffer->data(), io_buffer->data() + bytes_read);
|
| - scoped_ptr<base::ListValue> args =
|
| + std::unique_ptr<base::ListValue> args =
|
| bluetooth_socket::OnReceive::Create(receive_info);
|
| - scoped_ptr<Event> event(new Event(events::BLUETOOTH_SOCKET_ON_RECEIVE,
|
| - bluetooth_socket::OnReceive::kEventName,
|
| - std::move(args)));
|
| + std::unique_ptr<Event> event(
|
| + new Event(events::BLUETOOTH_SOCKET_ON_RECEIVE,
|
| + bluetooth_socket::OnReceive::kEventName, std::move(args)));
|
| PostEvent(params, std::move(event));
|
|
|
| // Post a task to delay the read until the socket is available, as
|
| @@ -232,9 +232,9 @@ void BluetoothSocketEventDispatcher::ReceiveErrorCallback(
|
| receive_error_info.socket_id = params.socket_id;
|
| receive_error_info.error_message = error;
|
| receive_error_info.error = MapReceiveErrorReason(error_reason);
|
| - scoped_ptr<base::ListValue> args =
|
| + std::unique_ptr<base::ListValue> args =
|
| bluetooth_socket::OnReceiveError::Create(receive_error_info);
|
| - scoped_ptr<Event> event(
|
| + std::unique_ptr<Event> event(
|
| new Event(events::BLUETOOTH_SOCKET_ON_RECEIVE_ERROR,
|
| bluetooth_socket::OnReceiveError::kEventName, std::move(args)));
|
| PostEvent(params, std::move(event));
|
| @@ -294,11 +294,11 @@ void BluetoothSocketEventDispatcher::AcceptCallback(
|
| bluetooth_socket::AcceptInfo accept_info;
|
| accept_info.socket_id = params.socket_id;
|
| accept_info.client_socket_id = client_socket_id;
|
| - scoped_ptr<base::ListValue> args =
|
| + std::unique_ptr<base::ListValue> args =
|
| bluetooth_socket::OnAccept::Create(accept_info);
|
| - scoped_ptr<Event> event(new Event(events::BLUETOOTH_SOCKET_ON_ACCEPT,
|
| - bluetooth_socket::OnAccept::kEventName,
|
| - std::move(args)));
|
| + std::unique_ptr<Event> event(new Event(events::BLUETOOTH_SOCKET_ON_ACCEPT,
|
| + bluetooth_socket::OnAccept::kEventName,
|
| + std::move(args)));
|
| PostEvent(params, std::move(event));
|
|
|
| // Post a task to delay the accept until the socket is available, as
|
| @@ -329,11 +329,11 @@ void BluetoothSocketEventDispatcher::AcceptErrorCallback(
|
| accept_error_info.socket_id = params.socket_id;
|
| accept_error_info.error_message = error;
|
| accept_error_info.error = MapAcceptErrorReason(error_reason);
|
| - scoped_ptr<base::ListValue> args =
|
| + std::unique_ptr<base::ListValue> args =
|
| bluetooth_socket::OnAcceptError::Create(accept_error_info);
|
| - scoped_ptr<Event> event(new Event(events::BLUETOOTH_SOCKET_ON_ACCEPT_ERROR,
|
| - bluetooth_socket::OnAcceptError::kEventName,
|
| - std::move(args)));
|
| + std::unique_ptr<Event> event(
|
| + new Event(events::BLUETOOTH_SOCKET_ON_ACCEPT_ERROR,
|
| + bluetooth_socket::OnAcceptError::kEventName, std::move(args)));
|
| PostEvent(params, std::move(event));
|
|
|
| // Since we got an error, the socket is now "paused" until the application
|
| @@ -347,7 +347,7 @@ void BluetoothSocketEventDispatcher::AcceptErrorCallback(
|
|
|
| // static
|
| void BluetoothSocketEventDispatcher::PostEvent(const SocketParams& params,
|
| - scoped_ptr<Event> event) {
|
| + std::unique_ptr<Event> event) {
|
| DCHECK_CURRENTLY_ON(params.thread_id);
|
|
|
| BrowserThread::PostTask(
|
| @@ -360,7 +360,7 @@ void BluetoothSocketEventDispatcher::PostEvent(const SocketParams& params,
|
| void BluetoothSocketEventDispatcher::DispatchEvent(
|
| void* browser_context_id,
|
| const std::string& extension_id,
|
| - scoped_ptr<Event> event) {
|
| + std::unique_ptr<Event> event) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
|
| content::BrowserContext* context =
|
|
|