| Index: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc
|
| diff --git a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc
|
| index 6050e6989cc4c79d16fa6b2a9e54072091015356..81a3c702ea8fbcdd1c4fea042b6f31d0830c4363 100644
|
| --- a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc
|
| +++ b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h"
|
|
|
| +#include <utility>
|
| +
|
| #include "base/bind.h"
|
| #include "base/logging.h"
|
| #include "base/values.h"
|
| @@ -864,8 +866,8 @@ void BluetoothLowEnergyEventRouter::GattServiceRemoved(
|
| apibtle::OnServiceRemoved::Create(api_service);
|
| scoped_ptr<Event> event(
|
| new Event(events::BLUETOOTH_LOW_ENERGY_ON_SERVICE_REMOVED,
|
| - apibtle::OnServiceRemoved::kEventName, args.Pass()));
|
| - EventRouter::Get(browser_context_)->BroadcastEvent(event.Pass());
|
| + apibtle::OnServiceRemoved::kEventName, std::move(args)));
|
| + EventRouter::Get(browser_context_)->BroadcastEvent(std::move(event));
|
| }
|
|
|
| void BluetoothLowEnergyEventRouter::GattDiscoveryCompleteForService(
|
| @@ -886,8 +888,8 @@ void BluetoothLowEnergyEventRouter::GattDiscoveryCompleteForService(
|
| apibtle::OnServiceAdded::Create(api_service);
|
| scoped_ptr<Event> event(
|
| new Event(events::BLUETOOTH_LOW_ENERGY_ON_SERVICE_ADDED,
|
| - apibtle::OnServiceAdded::kEventName, args.Pass()));
|
| - EventRouter::Get(browser_context_)->BroadcastEvent(event.Pass());
|
| + apibtle::OnServiceAdded::kEventName, std::move(args)));
|
| + EventRouter::Get(browser_context_)->BroadcastEvent(std::move(event));
|
| }
|
|
|
| void BluetoothLowEnergyEventRouter::DeviceAddressChanged(
|
| @@ -1024,7 +1026,7 @@ void BluetoothLowEnergyEventRouter::GattCharacteristicValueChanged(
|
| DispatchEventToExtensionsWithPermission(
|
| events::BLUETOOTH_LOW_ENERGY_ON_CHARACTERISTIC_VALUE_CHANGED,
|
| apibtle::OnCharacteristicValueChanged::kEventName, service->GetUUID(),
|
| - characteristic->GetIdentifier(), args.Pass());
|
| + characteristic->GetIdentifier(), std::move(args));
|
| }
|
|
|
| void BluetoothLowEnergyEventRouter::GattDescriptorValueChanged(
|
| @@ -1055,7 +1057,7 @@ void BluetoothLowEnergyEventRouter::GattDescriptorValueChanged(
|
| events::BLUETOOTH_LOW_ENERGY_ON_DESCRIPTOR_VALUE_CHANGED,
|
| apibtle::OnDescriptorValueChanged::kEventName,
|
| characteristic->GetService()->GetUUID(), "" /* characteristic_id */,
|
| - args.Pass());
|
| + std::move(args));
|
| }
|
|
|
| void BluetoothLowEnergyEventRouter::OnGetAdapter(
|
| @@ -1169,9 +1171,9 @@ void BluetoothLowEnergyEventRouter::DispatchEventToExtensionsWithPermission(
|
| // Send the event.
|
| scoped_ptr<base::ListValue> args_copy(args->DeepCopy());
|
| scoped_ptr<Event> event(
|
| - new Event(histogram_value, event_name, args_copy.Pass()));
|
| - EventRouter::Get(browser_context_)->DispatchEventToExtension(
|
| - extension_id, event.Pass());
|
| + new Event(histogram_value, event_name, std::move(args_copy)));
|
| + EventRouter::Get(browser_context_)
|
| + ->DispatchEventToExtension(extension_id, std::move(event));
|
| }
|
| }
|
|
|
| @@ -1278,7 +1280,7 @@ void BluetoothLowEnergyEventRouter::OnCreateGattConnection(
|
| DCHECK_NE(0U, connecting_devices_.count(connect_id));
|
|
|
| BluetoothLowEnergyConnection* conn = new BluetoothLowEnergyConnection(
|
| - persistent, extension_id, connection.Pass());
|
| + persistent, extension_id, std::move(connection));
|
| ConnectionResourceManager* manager =
|
| GetConnectionResourceManager(browser_context_);
|
| manager->Add(conn);
|
| @@ -1340,8 +1342,8 @@ void BluetoothLowEnergyEventRouter::OnStartNotifySession(
|
| DCHECK_NE(0U, pending_session_calls_.count(session_id));
|
|
|
| BluetoothLowEnergyNotifySession* resource =
|
| - new BluetoothLowEnergyNotifySession(
|
| - persistent, extension_id, session.Pass());
|
| + new BluetoothLowEnergyNotifySession(persistent, extension_id,
|
| + std::move(session));
|
|
|
| NotifySessionResourceManager* manager =
|
| GetNotifySessionResourceManager(browser_context_);
|
|
|