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

Unified Diff: extensions/browser/api/bluetooth/bluetooth_event_router.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/bluetooth/bluetooth_event_router.cc
diff --git a/extensions/browser/api/bluetooth/bluetooth_event_router.cc b/extensions/browser/api/bluetooth/bluetooth_event_router.cc
index 0f9345b4d0b6f4e9400e4e768ab2e03173dc90f0..bd73e7983c538c6cb7b7ca3b168e1e201b34e206 100644
--- a/extensions/browser/api/bluetooth/bluetooth_event_router.cc
+++ b/extensions/browser/api/bluetooth/bluetooth_event_router.cc
@@ -137,7 +137,7 @@ void BluetoothEventRouter::StartDiscoverySessionImpl(
pre_set_filter_map_.find(extension_id);
if (pre_set_iter != pre_set_filter_map_.end()) {
adapter->StartDiscoverySessionWithFilter(
- scoped_ptr<device::BluetoothDiscoveryFilter>(pre_set_iter->second),
+ std::unique_ptr<device::BluetoothDiscoveryFilter>(pre_set_iter->second),
base::Bind(&BluetoothEventRouter::OnStartDiscoverySession,
weak_ptr_factory_.GetWeakPtr(), extension_id, callback),
error_callback);
@@ -171,7 +171,7 @@ void BluetoothEventRouter::StopDiscoverySession(
}
void BluetoothEventRouter::SetDiscoveryFilter(
- scoped_ptr<device::BluetoothDiscoveryFilter> discovery_filter,
+ std::unique_ptr<device::BluetoothDiscoveryFilter> discovery_filter,
device::BluetoothAdapter* adapter,
const std::string& extension_id,
const base::Closure& callback,
@@ -377,9 +377,9 @@ void BluetoothEventRouter::DispatchAdapterStateEvent() {
CHECK(adapter_.get());
PopulateAdapterState(*adapter_.get(), &state);
- scoped_ptr<base::ListValue> args =
+ std::unique_ptr<base::ListValue> args =
bluetooth::OnAdapterStateChanged::Create(state);
- scoped_ptr<Event> event(
+ std::unique_ptr<Event> event(
new Event(events::BLUETOOTH_ON_ADAPTER_STATE_CHANGED,
bluetooth::OnAdapterStateChanged::kEventName, std::move(args)));
EventRouter::Get(browser_context_)->BroadcastEvent(std::move(event));
@@ -393,9 +393,9 @@ void BluetoothEventRouter::DispatchDeviceEvent(
CHECK(device);
bluetooth::BluetoothDeviceToApiDevice(*device, &extension_device);
- scoped_ptr<base::ListValue> args =
+ std::unique_ptr<base::ListValue> args =
bluetooth::OnDeviceAdded::Create(extension_device);
- scoped_ptr<Event> event(
+ std::unique_ptr<Event> event(
new Event(histogram_value, event_name, std::move(args)));
EventRouter::Get(browser_context_)->BroadcastEvent(std::move(event));
}
@@ -440,7 +440,7 @@ void BluetoothEventRouter::CleanUpAllExtensions() {
void BluetoothEventRouter::OnStartDiscoverySession(
const std::string& extension_id,
const base::Closure& callback,
- scoped_ptr<device::BluetoothDiscoverySession> discovery_session) {
+ std::unique_ptr<device::BluetoothDiscoverySession> discovery_session) {
// Clean up any existing session instance for the extension.
DiscoverySessionMap::iterator iter =
discovery_session_map_.find(extension_id);

Powered by Google App Engine
This is Rietveld 408576698