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

Unified Diff: extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc

Issue 598173003: Run clang-modernize -use-nullptr over src/extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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_low_energy/bluetooth_low_energy_api.cc
diff --git a/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc b/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
index 981a8a059c1dfbad1c7e61890a82f0b795d0fea3..ed1621737c2bb0e96b4ba9d1f3aca1e28deb52d6 100644
--- a/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
+++ b/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
@@ -156,7 +156,7 @@ bool BluetoothLowEnergyConnectFunction::DoWork() {
scoped_ptr<apibtle::Connect::Params> params(
apibtle::Connect::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
bool persistent = false; // Not persistent by default.
apibtle::ConnectProperties* properties = params.get()->properties.get();
@@ -199,7 +199,7 @@ bool BluetoothLowEnergyDisconnectFunction::DoWork() {
scoped_ptr<apibtle::Disconnect::Params> params(
apibtle::Disconnect::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
event_router->Disconnect(
extension(),
@@ -236,7 +236,7 @@ bool BluetoothLowEnergyGetServiceFunction::DoWork() {
scoped_ptr<apibtle::GetService::Params> params(
apibtle::GetService::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
apibtle::Service service;
BluetoothLowEnergyEventRouter::Status status =
@@ -269,7 +269,7 @@ bool BluetoothLowEnergyGetServicesFunction::DoWork() {
scoped_ptr<apibtle::GetServices::Params> params(
apibtle::GetServices::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
BluetoothLowEnergyEventRouter::ServiceList service_list;
if (!event_router->GetServices(params->device_address, &service_list)) {
@@ -300,7 +300,7 @@ bool BluetoothLowEnergyGetCharacteristicFunction::DoWork() {
scoped_ptr<apibtle::GetCharacteristic::Params> params(
apibtle::GetCharacteristic::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
apibtle::Characteristic characteristic;
BluetoothLowEnergyEventRouter::Status status =
@@ -337,7 +337,7 @@ bool BluetoothLowEnergyGetCharacteristicsFunction::DoWork() {
scoped_ptr<apibtle::GetCharacteristics::Params> params(
apibtle::GetCharacteristics::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
BluetoothLowEnergyEventRouter::CharacteristicList characteristic_list;
BluetoothLowEnergyEventRouter::Status status =
@@ -381,7 +381,7 @@ bool BluetoothLowEnergyGetIncludedServicesFunction::DoWork() {
scoped_ptr<apibtle::GetIncludedServices::Params> params(
apibtle::GetIncludedServices::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
BluetoothLowEnergyEventRouter::ServiceList service_list;
BluetoothLowEnergyEventRouter::Status status =
@@ -414,7 +414,7 @@ bool BluetoothLowEnergyGetDescriptorFunction::DoWork() {
scoped_ptr<apibtle::GetDescriptor::Params> params(
apibtle::GetDescriptor::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
apibtle::Descriptor descriptor;
BluetoothLowEnergyEventRouter::Status status = event_router->GetDescriptor(
@@ -450,7 +450,7 @@ bool BluetoothLowEnergyGetDescriptorsFunction::DoWork() {
scoped_ptr<apibtle::GetDescriptors::Params> params(
apibtle::GetDescriptors::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
BluetoothLowEnergyEventRouter::DescriptorList descriptor_list;
BluetoothLowEnergyEventRouter::Status status = event_router->GetDescriptors(
@@ -493,7 +493,7 @@ bool BluetoothLowEnergyReadCharacteristicValueFunction::DoWork() {
scoped_ptr<apibtle::ReadCharacteristicValue::Params> params(
apibtle::ReadCharacteristicValue::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
instance_id_ = params->characteristic_id;
event_router->ReadCharacteristicValue(
@@ -551,7 +551,7 @@ bool BluetoothLowEnergyWriteCharacteristicValueFunction::DoWork() {
scoped_ptr<apibtle::WriteCharacteristicValue::Params> params(
apibtle::WriteCharacteristicValue::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
std::vector<uint8> value(params->value.begin(), params->value.end());
event_router->WriteCharacteristicValue(
@@ -595,7 +595,7 @@ bool BluetoothLowEnergyStartCharacteristicNotificationsFunction::DoWork() {
scoped_ptr<apibtle::StartCharacteristicNotifications::Params> params(
apibtle::StartCharacteristicNotifications::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
bool persistent = false; // Not persistent by default.
apibtle::NotificationProperties* properties = params.get()->properties.get();
@@ -643,7 +643,7 @@ bool BluetoothLowEnergyStopCharacteristicNotificationsFunction::DoWork() {
scoped_ptr<apibtle::StopCharacteristicNotifications::Params> params(
apibtle::StopCharacteristicNotifications::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
event_router->StopCharacteristicNotifications(
extension(),
@@ -685,7 +685,7 @@ bool BluetoothLowEnergyReadDescriptorValueFunction::DoWork() {
scoped_ptr<apibtle::ReadDescriptorValue::Params> params(
apibtle::ReadDescriptorValue::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
instance_id_ = params->descriptor_id;
event_router->ReadDescriptorValue(
@@ -742,7 +742,7 @@ bool BluetoothLowEnergyWriteDescriptorValueFunction::DoWork() {
scoped_ptr<apibtle::WriteDescriptorValue::Params> params(
apibtle::WriteDescriptorValue::Params::Create(*args_));
- EXTENSION_FUNCTION_VALIDATE(params.get() != NULL);
+ EXTENSION_FUNCTION_VALIDATE(params.get() != nullptr);
std::vector<uint8> value(params->value.begin(), params->value.end());
event_router->WriteDescriptorValue(

Powered by Google App Engine
This is Rietveld 408576698