summaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2015-01-15 18:59:21 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-16 03:02:02 +0000
commit046d767863e9ae9b8b0f34e777f0f83b0d57d3c8 (patch)
tree59719fabe9cb6c63276619cdda4af7d6ce9cf66b /device
parent9f3f53769cafb2be799ca20b1dd8f22bbcbe6b5c (diff)
downloadchromium_src-046d767863e9ae9b8b0f34e777f0f83b0d57d3c8.zip
chromium_src-046d767863e9ae9b8b0f34e777f0f83b0d57d3c8.tar.gz
chromium_src-046d767863e9ae9b8b0f34e777f0f83b0d57d3c8.tar.bz2
Update {virtual,override,final} to follow C++11 style in device.
The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override. This patch was automatically generated with a ChromeOS build using a variation of https://codereview.chromium.org/598073004. BUG=417463 R=reillyg@chromium.org Review URL: https://codereview.chromium.org/799933008 Cr-Commit-Position: refs/heads/master@{#311826}
Diffstat (limited to 'device')
-rw-r--r--device/battery/battery_status_manager_chromeos.cc12
-rw-r--r--device/bluetooth/bluetooth_adapter_chromeos.h114
-rw-r--r--device/bluetooth/bluetooth_chromeos_unittest.cc54
-rw-r--r--device/bluetooth/bluetooth_device_chromeos.h66
-rw-r--r--device/bluetooth/bluetooth_gatt_chromeos_unittest.cc52
-rw-r--r--device/bluetooth/bluetooth_gatt_connection_chromeos.h14
-rw-r--r--device/bluetooth/bluetooth_gatt_notify_session_chromeos.h13
-rw-r--r--device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.h55
-rw-r--r--device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.h29
-rw-r--r--device/bluetooth/bluetooth_remote_gatt_service_chromeos.h48
-rw-r--r--device/bluetooth/bluetooth_socket_chromeos.h25
-rw-r--r--device/bluetooth/bluetooth_socket_chromeos_unittest.cc4
-rw-r--r--device/nfc/nfc_adapter_chromeos.h45
-rw-r--r--device/nfc/nfc_chromeos_unittest.cc29
-rw-r--r--device/nfc/nfc_peer_chromeos.h29
-rw-r--r--device/nfc/nfc_tag_chromeos.h29
-rw-r--r--device/nfc/nfc_tag_technology_chromeos.h24
-rw-r--r--device/usb/usb_device_impl.h2
18 files changed, 297 insertions, 347 deletions
diff --git a/device/battery/battery_status_manager_chromeos.cc b/device/battery/battery_status_manager_chromeos.cc
index 28a207f..b2ca0d4 100644
--- a/device/battery/battery_status_manager_chromeos.cc
+++ b/device/battery/battery_status_manager_chromeos.cc
@@ -44,7 +44,7 @@ class PowerManagerObserver
private:
friend class base::RefCountedThreadSafe<PowerManagerObserver>;
- virtual ~PowerManagerObserver() {}
+ ~PowerManagerObserver() override {}
bool IsBatteryPresent(
const power_manager::PowerSupplyProperties& proto) const {
@@ -76,7 +76,7 @@ class PowerManagerObserver
}
// chromeos::PowerManagerClient::Observer:
- virtual void PowerChanged(
+ void PowerChanged(
const power_manager::PowerSupplyProperties& proto) override {
BatteryStatus status;
@@ -126,18 +126,16 @@ class BatteryStatusManagerChromeOS
const BatteryStatusService::BatteryUpdateCallback& callback)
: observer_(new PowerManagerObserver(callback)) {}
- virtual ~BatteryStatusManagerChromeOS() { observer_->Stop(); }
+ ~BatteryStatusManagerChromeOS() override { observer_->Stop(); }
private:
// BatteryStatusManager:
- virtual bool StartListeningBatteryChange() override {
+ bool StartListeningBatteryChange() override {
observer_->Start();
return true;
}
- virtual void StopListeningBatteryChange() override {
- observer_->Stop();
- }
+ void StopListeningBatteryChange() override { observer_->Stop(); }
scoped_refptr<PowerManagerObserver> observer_;
diff --git a/device/bluetooth/bluetooth_adapter_chromeos.h b/device/bluetooth/bluetooth_adapter_chromeos.h
index f6afe8a..eda84cb4 100644
--- a/device/bluetooth/bluetooth_adapter_chromeos.h
+++ b/device/bluetooth/bluetooth_adapter_chromeos.h
@@ -48,34 +48,30 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterChromeOS
// BluetoothAdapter:
void DeleteOnCorrectThread() const override;
- virtual void AddObserver(
- device::BluetoothAdapter::Observer* observer) override;
- virtual void RemoveObserver(
- device::BluetoothAdapter::Observer* observer) override;
- virtual std::string GetAddress() const override;
- virtual std::string GetName() const override;
- virtual void SetName(const std::string& name,
+ void AddObserver(device::BluetoothAdapter::Observer* observer) override;
+ void RemoveObserver(device::BluetoothAdapter::Observer* observer) override;
+ std::string GetAddress() const override;
+ std::string GetName() const override;
+ void SetName(const std::string& name,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
+ bool IsInitialized() const override;
+ bool IsPresent() const override;
+ bool IsPowered() const override;
+ void SetPowered(bool powered,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
+ bool IsDiscoverable() const override;
+ void SetDiscoverable(bool discoverable,
const base::Closure& callback,
const ErrorCallback& error_callback) override;
- virtual bool IsInitialized() const override;
- virtual bool IsPresent() const override;
- virtual bool IsPowered() const override;
- virtual void SetPowered(
- bool powered,
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
- virtual bool IsDiscoverable() const override;
- virtual void SetDiscoverable(
- bool discoverable,
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
- virtual bool IsDiscovering() const override;
- virtual void CreateRfcommService(
+ bool IsDiscovering() const override;
+ void CreateRfcommService(
const device::BluetoothUUID& uuid,
const ServiceOptions& options,
const CreateServiceCallback& callback,
const CreateServiceErrorCallback& error_callback) override;
- virtual void CreateL2capService(
+ void CreateL2capService(
const device::BluetoothUUID& uuid,
const ServiceOptions& options,
const CreateServiceCallback& callback,
@@ -120,7 +116,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterChromeOS
protected:
// BluetoothAdapter:
- virtual void RemovePairingDelegateInternal(
+ void RemovePairingDelegateInternal(
device::BluetoothDevice::PairingDelegate* pairing_delegate) override;
private:
@@ -134,46 +130,44 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterChromeOS
typedef std::queue<DiscoveryCallbackPair> DiscoveryCallbackQueue;
BluetoothAdapterChromeOS();
- virtual ~BluetoothAdapterChromeOS();
+ ~BluetoothAdapterChromeOS() override;
// BluetoothAdapterClient::Observer override.
- virtual void AdapterAdded(const dbus::ObjectPath& object_path) override;
- virtual void AdapterRemoved(const dbus::ObjectPath& object_path) override;
- virtual void AdapterPropertyChanged(
- const dbus::ObjectPath& object_path,
- const std::string& property_name) override;
+ void AdapterAdded(const dbus::ObjectPath& object_path) override;
+ void AdapterRemoved(const dbus::ObjectPath& object_path) override;
+ void AdapterPropertyChanged(const dbus::ObjectPath& object_path,
+ const std::string& property_name) override;
// BluetoothDeviceClient::Observer override.
- virtual void DeviceAdded(const dbus::ObjectPath& object_path) override;
- virtual void DeviceRemoved(const dbus::ObjectPath& object_path) override;
- virtual void DevicePropertyChanged(const dbus::ObjectPath& object_path,
- const std::string& property_name) override;
+ void DeviceAdded(const dbus::ObjectPath& object_path) override;
+ void DeviceRemoved(const dbus::ObjectPath& object_path) override;
+ void DevicePropertyChanged(const dbus::ObjectPath& object_path,
+ const std::string& property_name) override;
// BluetoothInputClient::Observer override.
- virtual void InputPropertyChanged(const dbus::ObjectPath& object_path,
- const std::string& property_name) override;
+ void InputPropertyChanged(const dbus::ObjectPath& object_path,
+ const std::string& property_name) override;
// BluetoothAgentServiceProvider::Delegate override.
- virtual void Released() override;
- virtual void RequestPinCode(const dbus::ObjectPath& device_path,
- const PinCodeCallback& callback) override;
- virtual void DisplayPinCode(const dbus::ObjectPath& device_path,
- const std::string& pincode) override;
- virtual void RequestPasskey(const dbus::ObjectPath& device_path,
- const PasskeyCallback& callback) override;
- virtual void DisplayPasskey(const dbus::ObjectPath& device_path,
- uint32 passkey, uint16 entered) override;
- virtual void RequestConfirmation(const dbus::ObjectPath& device_path,
- uint32 passkey,
- const ConfirmationCallback& callback)
- override;
- virtual void RequestAuthorization(const dbus::ObjectPath& device_path,
- const ConfirmationCallback& callback)
- override;
- virtual void AuthorizeService(const dbus::ObjectPath& device_path,
- const std::string& uuid,
- const ConfirmationCallback& callback) override;
- virtual void Cancel() override;
+ void Released() override;
+ void RequestPinCode(const dbus::ObjectPath& device_path,
+ const PinCodeCallback& callback) override;
+ void DisplayPinCode(const dbus::ObjectPath& device_path,
+ const std::string& pincode) override;
+ void RequestPasskey(const dbus::ObjectPath& device_path,
+ const PasskeyCallback& callback) override;
+ void DisplayPasskey(const dbus::ObjectPath& device_path,
+ uint32 passkey,
+ uint16 entered) override;
+ void RequestConfirmation(const dbus::ObjectPath& device_path,
+ uint32 passkey,
+ const ConfirmationCallback& callback) override;
+ void RequestAuthorization(const dbus::ObjectPath& device_path,
+ const ConfirmationCallback& callback) override;
+ void AuthorizeService(const dbus::ObjectPath& device_path,
+ const std::string& uuid,
+ const ConfirmationCallback& callback) override;
+ void Cancel() override;
// Called by dbus:: on completion of the D-Bus method call to register the
// pairing agent.
@@ -222,12 +216,10 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterChromeOS
bool success);
// BluetoothAdapter:
- virtual void AddDiscoverySession(
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
- virtual void RemoveDiscoverySession(
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
+ void AddDiscoverySession(const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
+ void RemoveDiscoverySession(const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
// Called by dbus:: on completion of the D-Bus method call to start discovery.
void OnStartDiscovery(const base::Closure& callback);
diff --git a/device/bluetooth/bluetooth_chromeos_unittest.cc b/device/bluetooth/bluetooth_chromeos_unittest.cc
index 08c353e..0c25a402 100644
--- a/device/bluetooth/bluetooth_chromeos_unittest.cc
+++ b/device/bluetooth/bluetooth_chromeos_unittest.cc
@@ -50,43 +50,39 @@ class TestObserver : public BluetoothAdapter::Observer {
adapter_->AddObserver(this);
}
- virtual ~TestObserver() {
- adapter_->RemoveObserver(this);
- }
+ ~TestObserver() override { adapter_->RemoveObserver(this); }
- virtual void AdapterPresentChanged(BluetoothAdapter* adapter,
- bool present) override {
+ void AdapterPresentChanged(BluetoothAdapter* adapter, bool present) override {
EXPECT_EQ(adapter_.get(), adapter);
++present_changed_count_;
last_present_ = present;
}
- virtual void AdapterPoweredChanged(BluetoothAdapter* adapter,
- bool powered) override {
+ void AdapterPoweredChanged(BluetoothAdapter* adapter, bool powered) override {
EXPECT_EQ(adapter_.get(), adapter);
++powered_changed_count_;
last_powered_ = powered;
}
- virtual void AdapterDiscoverableChanged(BluetoothAdapter* adapter,
- bool discoverable) override {
+ void AdapterDiscoverableChanged(BluetoothAdapter* adapter,
+ bool discoverable) override {
EXPECT_EQ(adapter_.get(), adapter);
++discoverable_changed_count_;
}
- virtual void AdapterDiscoveringChanged(BluetoothAdapter* adapter,
- bool discovering) override {
+ void AdapterDiscoveringChanged(BluetoothAdapter* adapter,
+ bool discovering) override {
EXPECT_EQ(adapter_.get(), adapter);
++discovering_changed_count_;
last_discovering_ = discovering;
}
- virtual void DeviceAdded(BluetoothAdapter* adapter,
- BluetoothDevice* device) override {
+ void DeviceAdded(BluetoothAdapter* adapter,
+ BluetoothDevice* device) override {
EXPECT_EQ(adapter_.get(), adapter);
++device_added_count_;
@@ -96,8 +92,8 @@ class TestObserver : public BluetoothAdapter::Observer {
QuitMessageLoop();
}
- virtual void DeviceChanged(BluetoothAdapter* adapter,
- BluetoothDevice* device) override {
+ void DeviceChanged(BluetoothAdapter* adapter,
+ BluetoothDevice* device) override {
EXPECT_EQ(adapter_.get(), adapter);
++device_changed_count_;
@@ -107,8 +103,8 @@ class TestObserver : public BluetoothAdapter::Observer {
QuitMessageLoop();
}
- virtual void DeviceRemoved(BluetoothAdapter* adapter,
- BluetoothDevice* device) override {
+ void DeviceRemoved(BluetoothAdapter* adapter,
+ BluetoothDevice* device) override {
EXPECT_EQ(adapter_.get(), adapter);
++device_removed_count_;
@@ -165,52 +161,50 @@ class TestPairingDelegate : public BluetoothDevice::PairingDelegate {
authorize_pairing_count_(0),
last_passkey_(9999999U),
last_entered_(999U) {}
- virtual ~TestPairingDelegate() {}
+ ~TestPairingDelegate() override {}
- virtual void RequestPinCode(BluetoothDevice* device) override {
+ void RequestPinCode(BluetoothDevice* device) override {
++call_count_;
++request_pincode_count_;
QuitMessageLoop();
}
- virtual void RequestPasskey(BluetoothDevice* device) override {
+ void RequestPasskey(BluetoothDevice* device) override {
++call_count_;
++request_passkey_count_;
QuitMessageLoop();
}
- virtual void DisplayPinCode(BluetoothDevice* device,
- const std::string& pincode) override {
+ void DisplayPinCode(BluetoothDevice* device,
+ const std::string& pincode) override {
++call_count_;
++display_pincode_count_;
last_pincode_ = pincode;
QuitMessageLoop();
}
- virtual void DisplayPasskey(BluetoothDevice* device,
- uint32 passkey) override {
+ void DisplayPasskey(BluetoothDevice* device, uint32 passkey) override {
++call_count_;
++display_passkey_count_;
last_passkey_ = passkey;
QuitMessageLoop();
}
- virtual void KeysEntered(BluetoothDevice* device, uint32 entered) override {
+ void KeysEntered(BluetoothDevice* device, uint32 entered) override {
++call_count_;
++keys_entered_count_;
last_entered_ = entered;
QuitMessageLoop();
}
- virtual void ConfirmPasskey(BluetoothDevice* device,
- uint32 passkey) override {
+ void ConfirmPasskey(BluetoothDevice* device, uint32 passkey) override {
++call_count_;
++confirm_passkey_count_;
last_passkey_ = passkey;
QuitMessageLoop();
}
- virtual void AuthorizePairing(BluetoothDevice* device) override {
+ void AuthorizePairing(BluetoothDevice* device) override {
++call_count_;
++authorize_pairing_count_;
QuitMessageLoop();
@@ -240,7 +234,7 @@ class TestPairingDelegate : public BluetoothDevice::PairingDelegate {
class BluetoothChromeOSTest : public testing::Test {
public:
- virtual void SetUp() {
+ void SetUp() override {
scoped_ptr<DBusThreadManagerSetter> dbus_setter =
chromeos::DBusThreadManager::GetSetterForTesting();
// We need to initialize DBusThreadManager early to prevent
@@ -269,7 +263,7 @@ class BluetoothChromeOSTest : public testing::Test {
last_client_error_ = "";
}
- virtual void TearDown() {
+ void TearDown() override {
for (ScopedVector<BluetoothDiscoverySession>::iterator iter =
discovery_sessions_.begin();
iter != discovery_sessions_.end();
diff --git a/device/bluetooth/bluetooth_device_chromeos.h b/device/bluetooth/bluetooth_device_chromeos.h
index dd85355..6b9afc9 100644
--- a/device/bluetooth/bluetooth_device_chromeos.h
+++ b/device/bluetooth/bluetooth_device_chromeos.h
@@ -33,44 +33,42 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceChromeOS
public BluetoothGattServiceClient::Observer {
public:
// BluetoothDevice override
- virtual uint32 GetBluetoothClass() const override;
- virtual std::string GetAddress() const override;
- virtual VendorIDSource GetVendorIDSource() const override;
- virtual uint16 GetVendorID() const override;
- virtual uint16 GetProductID() const override;
- virtual uint16 GetDeviceID() const override;
- virtual bool IsPaired() const override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectable() const override;
- virtual bool IsConnecting() const override;
- virtual UUIDList GetUUIDs() const override;
- virtual bool ExpectingPinCode() const override;
- virtual bool ExpectingPasskey() const override;
- virtual bool ExpectingConfirmation() const override;
+ uint32 GetBluetoothClass() const override;
+ std::string GetAddress() const override;
+ VendorIDSource GetVendorIDSource() const override;
+ uint16 GetVendorID() const override;
+ uint16 GetProductID() const override;
+ uint16 GetDeviceID() const override;
+ bool IsPaired() const override;
+ bool IsConnected() const override;
+ bool IsConnectable() const override;
+ bool IsConnecting() const override;
+ UUIDList GetUUIDs() const override;
+ bool ExpectingPinCode() const override;
+ bool ExpectingPasskey() const override;
+ bool ExpectingConfirmation() const override;
void GetConnectionInfo(
const ConnectionInfoCallback& callback) override;
- virtual void Connect(
- device::BluetoothDevice::PairingDelegate* pairing_delegate,
- const base::Closure& callback,
- const ConnectErrorCallback& error_callback) override;
- virtual void SetPinCode(const std::string& pincode) override;
- virtual void SetPasskey(uint32 passkey) override;
- virtual void ConfirmPairing() override;
- virtual void RejectPairing() override;
- virtual void CancelPairing() override;
- virtual void Disconnect(
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
- virtual void Forget(const ErrorCallback& error_callback) override;
- virtual void ConnectToService(
+ void Connect(device::BluetoothDevice::PairingDelegate* pairing_delegate,
+ const base::Closure& callback,
+ const ConnectErrorCallback& error_callback) override;
+ void SetPinCode(const std::string& pincode) override;
+ void SetPasskey(uint32 passkey) override;
+ void ConfirmPairing() override;
+ void RejectPairing() override;
+ void CancelPairing() override;
+ void Disconnect(const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
+ void Forget(const ErrorCallback& error_callback) override;
+ void ConnectToService(
const device::BluetoothUUID& uuid,
const ConnectToServiceCallback& callback,
const ConnectToServiceErrorCallback& error_callback) override;
- virtual void ConnectToServiceInsecurely(
+ void ConnectToServiceInsecurely(
const device::BluetoothUUID& uuid,
const ConnectToServiceCallback& callback,
const ConnectToServiceErrorCallback& error_callback) override;
- virtual void CreateGattConnection(
+ void CreateGattConnection(
const GattConnectionCallback& callback,
const ConnectErrorCallback& error_callback) override;
@@ -92,7 +90,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceChromeOS
protected:
// BluetoothDevice override
- virtual std::string GetDeviceName() const override;
+ std::string GetDeviceName() const override;
private:
friend class BluetoothAdapterChromeOS;
@@ -102,11 +100,11 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceChromeOS
const dbus::ObjectPath& object_path,
scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
scoped_refptr<device::BluetoothSocketThread> socket_thread);
- virtual ~BluetoothDeviceChromeOS();
+ ~BluetoothDeviceChromeOS() override;
// BluetoothGattServiceClient::Observer overrides.
- virtual void GattServiceAdded(const dbus::ObjectPath& object_path) override;
- virtual void GattServiceRemoved(const dbus::ObjectPath& object_path) override;
+ void GattServiceAdded(const dbus::ObjectPath& object_path) override;
+ void GattServiceRemoved(const dbus::ObjectPath& object_path) override;
// Called by dbus:: on completion of the D-Bus method call to get the
// connection attributes of the current connection to the device.
diff --git a/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc b/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc
index de3750d..fca6a1dc 100644
--- a/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc
+++ b/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc
@@ -74,14 +74,12 @@ class TestObserver : public BluetoothAdapter::Observer {
adapter_->AddObserver(this);
}
- virtual ~TestObserver() {
- adapter_->RemoveObserver(this);
- }
+ ~TestObserver() override { adapter_->RemoveObserver(this); }
// BluetoothAdapter::Observer overrides.
- virtual void GattServiceAdded(BluetoothAdapter* adapter,
- BluetoothDevice* device,
- BluetoothGattService* service) override {
+ void GattServiceAdded(BluetoothAdapter* adapter,
+ BluetoothDevice* device,
+ BluetoothGattService* service) override {
ASSERT_EQ(adapter_.get(), adapter);
ASSERT_EQ(service->GetDevice(), device);
@@ -97,9 +95,9 @@ class TestObserver : public BluetoothAdapter::Observer {
QuitMessageLoop();
}
- virtual void GattServiceRemoved(BluetoothAdapter* adapter,
- BluetoothDevice* device,
- BluetoothGattService* service) override {
+ void GattServiceRemoved(BluetoothAdapter* adapter,
+ BluetoothDevice* device,
+ BluetoothGattService* service) override {
ASSERT_EQ(adapter_.get(), adapter);
ASSERT_EQ(service->GetDevice(), device);
@@ -116,24 +114,23 @@ class TestObserver : public BluetoothAdapter::Observer {
QuitMessageLoop();
}
- virtual void GattDiscoveryCompleteForService(
- BluetoothAdapter* adapter,
- BluetoothGattService* service) override {
+ void GattDiscoveryCompleteForService(BluetoothAdapter* adapter,
+ BluetoothGattService* service) override {
ASSERT_EQ(adapter_.get(), adapter);
++gatt_discovery_complete_count_;
QuitMessageLoop();
}
- virtual void GattServiceChanged(BluetoothAdapter* adapter,
- BluetoothGattService* service) override {
+ void GattServiceChanged(BluetoothAdapter* adapter,
+ BluetoothGattService* service) override {
ASSERT_EQ(adapter_.get(), adapter);
++gatt_service_changed_count_;
QuitMessageLoop();
}
- virtual void GattCharacteristicAdded(
+ void GattCharacteristicAdded(
BluetoothAdapter* adapter,
BluetoothGattCharacteristic* characteristic) override {
ASSERT_EQ(adapter_.get(), adapter);
@@ -150,7 +147,7 @@ class TestObserver : public BluetoothAdapter::Observer {
QuitMessageLoop();
}
- virtual void GattCharacteristicRemoved(
+ void GattCharacteristicRemoved(
BluetoothAdapter* adapter,
BluetoothGattCharacteristic* characteristic) override {
ASSERT_EQ(adapter_.get(), adapter);
@@ -167,7 +164,7 @@ class TestObserver : public BluetoothAdapter::Observer {
QuitMessageLoop();
}
- virtual void GattCharacteristicValueChanged(
+ void GattCharacteristicValueChanged(
BluetoothAdapter* adapter,
BluetoothGattCharacteristic* characteristic,
const std::vector<uint8>& value) override {
@@ -186,9 +183,8 @@ class TestObserver : public BluetoothAdapter::Observer {
QuitMessageLoop();
}
- virtual void GattDescriptorAdded(
- BluetoothAdapter* adapter,
- BluetoothGattDescriptor* descriptor) override {
+ void GattDescriptorAdded(BluetoothAdapter* adapter,
+ BluetoothGattDescriptor* descriptor) override {
ASSERT_EQ(adapter_.get(), adapter);
++gatt_descriptor_added_count_;
@@ -203,9 +199,8 @@ class TestObserver : public BluetoothAdapter::Observer {
QuitMessageLoop();
}
- virtual void GattDescriptorRemoved(
- BluetoothAdapter* adapter,
- BluetoothGattDescriptor* descriptor) override {
+ void GattDescriptorRemoved(BluetoothAdapter* adapter,
+ BluetoothGattDescriptor* descriptor) override {
ASSERT_EQ(adapter_.get(), adapter);
++gatt_descriptor_removed_count_;
@@ -220,10 +215,9 @@ class TestObserver : public BluetoothAdapter::Observer {
QuitMessageLoop();
}
- virtual void GattDescriptorValueChanged(
- BluetoothAdapter* adapter,
- BluetoothGattDescriptor* descriptor,
- const std::vector<uint8>& value) override {
+ void GattDescriptorValueChanged(BluetoothAdapter* adapter,
+ BluetoothGattDescriptor* descriptor,
+ const std::vector<uint8>& value) override {
ASSERT_EQ(adapter_.get(), adapter);
++gatt_descriptor_value_changed_count_;
@@ -280,7 +274,7 @@ class BluetoothGattChromeOSTest : public testing::Test {
error_callback_count_(0) {
}
- virtual void SetUp() {
+ void SetUp() override {
scoped_ptr<DBusThreadManagerSetter> dbus_setter =
chromeos::DBusThreadManager::GetSetterForTesting();
fake_bluetooth_device_client_ = new FakeBluetoothDeviceClient;
@@ -319,7 +313,7 @@ class BluetoothGattChromeOSTest : public testing::Test {
ASSERT_TRUE(adapter_->IsPowered());
}
- virtual void TearDown() {
+ void TearDown() override {
adapter_ = NULL;
update_sessions_.clear();
gatt_conn_.reset();
diff --git a/device/bluetooth/bluetooth_gatt_connection_chromeos.h b/device/bluetooth/bluetooth_gatt_connection_chromeos.h
index 5f5c4bf..78fc94b 100644
--- a/device/bluetooth/bluetooth_gatt_connection_chromeos.h
+++ b/device/bluetooth/bluetooth_gatt_connection_chromeos.h
@@ -31,19 +31,19 @@ class BluetoothGattConnectionChromeOS
scoped_refptr<device::BluetoothAdapter> adapter,
const std::string& device_address,
const dbus::ObjectPath& object_path);
- virtual ~BluetoothGattConnectionChromeOS();
+ ~BluetoothGattConnectionChromeOS() override;
// BluetoothGattConnection overrides.
- virtual std::string GetDeviceAddress() const override;
- virtual bool IsConnected() override;
- virtual void Disconnect(const base::Closure& callback) override;
+ std::string GetDeviceAddress() const override;
+ bool IsConnected() override;
+ void Disconnect(const base::Closure& callback) override;
private:
// chromeos::BluetoothDeviceClient::Observer overrides.
- virtual void DeviceRemoved(const dbus::ObjectPath& object_path) override;
- virtual void DevicePropertyChanged(const dbus::ObjectPath& object_path,
- const std::string& property_name) override;
+ void DeviceRemoved(const dbus::ObjectPath& object_path) override;
+ void DevicePropertyChanged(const dbus::ObjectPath& object_path,
+ const std::string& property_name) override;
// True, if the connection is currently active.
bool connected_;
diff --git a/device/bluetooth/bluetooth_gatt_notify_session_chromeos.h b/device/bluetooth/bluetooth_gatt_notify_session_chromeos.h
index 3ad3843..245a72f 100644
--- a/device/bluetooth/bluetooth_gatt_notify_session_chromeos.h
+++ b/device/bluetooth/bluetooth_gatt_notify_session_chromeos.h
@@ -27,12 +27,12 @@ class BluetoothGattNotifySessionChromeOS
: public device::BluetoothGattNotifySession,
public BluetoothGattCharacteristicClient::Observer {
public:
- virtual ~BluetoothGattNotifySessionChromeOS();
+ ~BluetoothGattNotifySessionChromeOS() override;
// BluetoothGattNotifySession overrides.
- virtual std::string GetCharacteristicIdentifier() const override;
- virtual bool IsActive() override;
- virtual void Stop(const base::Closure& callback) override;
+ std::string GetCharacteristicIdentifier() const override;
+ bool IsActive() override;
+ void Stop(const base::Closure& callback) override;
private:
friend class BluetoothRemoteGattCharacteristicChromeOS;
@@ -45,9 +45,8 @@ class BluetoothGattNotifySessionChromeOS
const dbus::ObjectPath& characteristic_path);
// BluetoothGattCharacteristicClient::Observer overrides.
- virtual void GattCharacteristicRemoved(
- const dbus::ObjectPath& object_path) override;
- virtual void GattCharacteristicPropertyChanged(
+ void GattCharacteristicRemoved(const dbus::ObjectPath& object_path) override;
+ void GattCharacteristicPropertyChanged(
const dbus::ObjectPath& object_path,
const std::string& property_name) override;
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.h
index ab0ce0b..12de00e 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.h
@@ -39,30 +39,26 @@ class BluetoothRemoteGattCharacteristicChromeOS
public BluetoothGattDescriptorClient::Observer {
public:
// device::BluetoothGattCharacteristic overrides.
- virtual std::string GetIdentifier() const override;
- virtual device::BluetoothUUID GetUUID() const override;
- virtual bool IsLocal() const override;
- virtual const std::vector<uint8>& GetValue() const override;
- virtual device::BluetoothGattService* GetService() const override;
- virtual Properties GetProperties() const override;
- virtual Permissions GetPermissions() const override;
- virtual bool IsNotifying() const override;
- virtual std::vector<device::BluetoothGattDescriptor*>
- GetDescriptors() const override;
- virtual device::BluetoothGattDescriptor* GetDescriptor(
+ std::string GetIdentifier() const override;
+ device::BluetoothUUID GetUUID() const override;
+ bool IsLocal() const override;
+ const std::vector<uint8>& GetValue() const override;
+ device::BluetoothGattService* GetService() const override;
+ Properties GetProperties() const override;
+ Permissions GetPermissions() const override;
+ bool IsNotifying() const override;
+ std::vector<device::BluetoothGattDescriptor*> GetDescriptors() const override;
+ device::BluetoothGattDescriptor* GetDescriptor(
const std::string& identifier) const override;
- virtual bool AddDescriptor(
- device::BluetoothGattDescriptor* descriptor) override;
- virtual bool UpdateValue(const std::vector<uint8>& value) override;
- virtual void ReadRemoteCharacteristic(
- const ValueCallback& callback,
- const ErrorCallback& error_callback) override;
- virtual void WriteRemoteCharacteristic(
- const std::vector<uint8>& new_value,
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
- virtual void StartNotifySession(const NotifySessionCallback& callback,
- const ErrorCallback& error_callback) override;
+ bool AddDescriptor(device::BluetoothGattDescriptor* descriptor) override;
+ bool UpdateValue(const std::vector<uint8>& value) override;
+ void ReadRemoteCharacteristic(const ValueCallback& callback,
+ const ErrorCallback& error_callback) override;
+ void WriteRemoteCharacteristic(const std::vector<uint8>& new_value,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
+ void StartNotifySession(const NotifySessionCallback& callback,
+ const ErrorCallback& error_callback) override;
// Removes one value update session and invokes |callback| on completion. This
// decrements the session reference count by 1 and if the number reaches 0,
@@ -79,18 +75,15 @@ class BluetoothRemoteGattCharacteristicChromeOS
BluetoothRemoteGattCharacteristicChromeOS(
BluetoothRemoteGattServiceChromeOS* service,
const dbus::ObjectPath& object_path);
- virtual ~BluetoothRemoteGattCharacteristicChromeOS();
+ ~BluetoothRemoteGattCharacteristicChromeOS() override;
// BluetoothGattCharacteristicClient::Observer overrides.
- virtual void GattCharacteristicValueUpdated(
- const dbus::ObjectPath& object_path,
- const std::vector<uint8>& value) override;
+ void GattCharacteristicValueUpdated(const dbus::ObjectPath& object_path,
+ const std::vector<uint8>& value) override;
// BluetoothGattDescriptorClient::Observer overrides.
- virtual void GattDescriptorAdded(
- const dbus::ObjectPath& object_path) override;
- virtual void GattDescriptorRemoved(
- const dbus::ObjectPath& object_path) override;
+ void GattDescriptorAdded(const dbus::ObjectPath& object_path) override;
+ void GattDescriptorRemoved(const dbus::ObjectPath& object_path) override;
// Called by dbus:: on successful completion of a request to read
// the characteristic value.
diff --git a/device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.h b/device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.h
index f4a2a11..c2deed5 100644
--- a/device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.h
+++ b/device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.h
@@ -30,21 +30,18 @@ class BluetoothRemoteGattDescriptorChromeOS
: public device::BluetoothGattDescriptor {
public:
// device::BluetoothGattDescriptor overrides.
- virtual std::string GetIdentifier() const override;
- virtual device::BluetoothUUID GetUUID() const override;
- virtual bool IsLocal() const override;
- virtual const std::vector<uint8>& GetValue() const override;
- virtual device::BluetoothGattCharacteristic*
- GetCharacteristic() const override;
- virtual device::BluetoothGattCharacteristic::Permissions
- GetPermissions() const override;
- virtual void ReadRemoteDescriptor(
- const ValueCallback& callback,
- const ErrorCallback& error_callback) override;
- virtual void WriteRemoteDescriptor(
- const std::vector<uint8>& new_value,
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
+ std::string GetIdentifier() const override;
+ device::BluetoothUUID GetUUID() const override;
+ bool IsLocal() const override;
+ const std::vector<uint8>& GetValue() const override;
+ device::BluetoothGattCharacteristic* GetCharacteristic() const override;
+ device::BluetoothGattCharacteristic::Permissions GetPermissions()
+ const override;
+ void ReadRemoteDescriptor(const ValueCallback& callback,
+ const ErrorCallback& error_callback) override;
+ void WriteRemoteDescriptor(const std::vector<uint8>& new_value,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
// Object path of the underlying D-Bus characteristic.
const dbus::ObjectPath& object_path() const { return object_path_; }
@@ -55,7 +52,7 @@ class BluetoothRemoteGattDescriptorChromeOS
BluetoothRemoteGattDescriptorChromeOS(
BluetoothRemoteGattCharacteristicChromeOS* characteristic,
const dbus::ObjectPath& object_path);
- virtual ~BluetoothRemoteGattDescriptorChromeOS();
+ ~BluetoothRemoteGattDescriptorChromeOS() override;
// Called by dbus:: on successful completion of a request to read
// the descriptor value.
diff --git a/device/bluetooth/bluetooth_remote_gatt_service_chromeos.h b/device/bluetooth/bluetooth_remote_gatt_service_chromeos.h
index 49b6262..a0373ae3 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service_chromeos.h
+++ b/device/bluetooth/bluetooth_remote_gatt_service_chromeos.h
@@ -40,25 +40,24 @@ class BluetoothRemoteGattServiceChromeOS
public BluetoothGattCharacteristicClient::Observer {
public:
// device::BluetoothGattService overrides.
- virtual std::string GetIdentifier() const override;
- virtual device::BluetoothUUID GetUUID() const override;
- virtual bool IsLocal() const override;
- virtual bool IsPrimary() const override;
- virtual device::BluetoothDevice* GetDevice() const override;
- virtual std::vector<device::BluetoothGattCharacteristic*>
- GetCharacteristics() const override;
- virtual std::vector<device::BluetoothGattService*>
- GetIncludedServices() const override;
- virtual device::BluetoothGattCharacteristic* GetCharacteristic(
+ std::string GetIdentifier() const override;
+ device::BluetoothUUID GetUUID() const override;
+ bool IsLocal() const override;
+ bool IsPrimary() const override;
+ device::BluetoothDevice* GetDevice() const override;
+ std::vector<device::BluetoothGattCharacteristic*> GetCharacteristics()
+ const override;
+ std::vector<device::BluetoothGattService*> GetIncludedServices()
+ const override;
+ device::BluetoothGattCharacteristic* GetCharacteristic(
const std::string& identifier) const override;
- virtual bool AddCharacteristic(
+ bool AddCharacteristic(
device::BluetoothGattCharacteristic* characteristic) override;
- virtual bool AddIncludedService(
- device::BluetoothGattService* service) override;
- virtual void Register(const base::Closure& callback,
- const ErrorCallback& error_callback) override;
- virtual void Unregister(const base::Closure& callback,
- const ErrorCallback& error_callback) override;
+ bool AddIncludedService(device::BluetoothGattService* service) override;
+ void Register(const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
+ void Unregister(const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
// Object path of the underlying service.
const dbus::ObjectPath& object_path() const { return object_path_; }
@@ -108,19 +107,16 @@ class BluetoothRemoteGattServiceChromeOS
BluetoothRemoteGattServiceChromeOS(BluetoothAdapterChromeOS* adapter,
BluetoothDeviceChromeOS* device,
const dbus::ObjectPath& object_path);
- virtual ~BluetoothRemoteGattServiceChromeOS();
+ ~BluetoothRemoteGattServiceChromeOS() override;
// BluetoothGattServiceClient::Observer override.
- virtual void GattServicePropertyChanged(
- const dbus::ObjectPath& object_path,
- const std::string& property_name) override;
+ void GattServicePropertyChanged(const dbus::ObjectPath& object_path,
+ const std::string& property_name) override;
// BluetoothGattCharacteristicClient::Observer override.
- virtual void GattCharacteristicAdded(
- const dbus::ObjectPath& object_path) override;
- virtual void GattCharacteristicRemoved(
- const dbus::ObjectPath& object_path) override;
- virtual void GattCharacteristicPropertyChanged(
+ void GattCharacteristicAdded(const dbus::ObjectPath& object_path) override;
+ void GattCharacteristicRemoved(const dbus::ObjectPath& object_path) override;
+ void GattCharacteristicPropertyChanged(
const dbus::ObjectPath& object_path,
const std::string& property_name) override;
diff --git a/device/bluetooth/bluetooth_socket_chromeos.h b/device/bluetooth/bluetooth_socket_chromeos.h
index 6ea2c21..640292e 100644
--- a/device/bluetooth/bluetooth_socket_chromeos.h
+++ b/device/bluetooth/bluetooth_socket_chromeos.h
@@ -70,16 +70,16 @@ class CHROMEOS_EXPORT BluetoothSocketChromeOS
const ErrorCompletionCallback& error_callback);
// BluetoothSocket:
- virtual void Close() override;
- virtual void Disconnect(const base::Closure& callback) override;
- virtual void Accept(const AcceptCompletionCallback& success_callback,
- const ErrorCompletionCallback& error_callback) override;
+ void Close() override;
+ void Disconnect(const base::Closure& callback) override;
+ void Accept(const AcceptCompletionCallback& success_callback,
+ const ErrorCompletionCallback& error_callback) override;
// Returns the object path of the socket.
const dbus::ObjectPath& object_path() const { return object_path_; }
protected:
- virtual ~BluetoothSocketChromeOS();
+ ~BluetoothSocketChromeOS() override;
private:
BluetoothSocketChromeOS(
@@ -102,8 +102,8 @@ class CHROMEOS_EXPORT BluetoothSocketChromeOS
const std::string& error_message);
// BluetoothAdapter::Observer:
- virtual void AdapterPresentChanged(device::BluetoothAdapter* adapter,
- bool present) override;
+ void AdapterPresentChanged(device::BluetoothAdapter* adapter,
+ bool present) override;
// Called by dbus:: on completion of the RegisterProfile() method call
// triggered as a result of the adapter becoming present again.
@@ -112,16 +112,15 @@ class CHROMEOS_EXPORT BluetoothSocketChromeOS
const std::string& error_message);
// BluetoothProfileServiceProvider::Delegate:
- virtual void Released() override;
- virtual void NewConnection(
+ void Released() override;
+ void NewConnection(
const dbus::ObjectPath& device_path,
scoped_ptr<dbus::FileDescriptor> fd,
const BluetoothProfileServiceProvider::Delegate::Options& options,
const ConfirmationCallback& callback) override;
- virtual void RequestDisconnection(
- const dbus::ObjectPath& device_path,
- const ConfirmationCallback& callback) override;
- virtual void Cancel() override;
+ void RequestDisconnection(const dbus::ObjectPath& device_path,
+ const ConfirmationCallback& callback) override;
+ void Cancel() override;
// Method run to accept a single incoming connection.
void AcceptConnectionRequest();
diff --git a/device/bluetooth/bluetooth_socket_chromeos_unittest.cc b/device/bluetooth/bluetooth_socket_chromeos_unittest.cc
index a86e8f1..1a4aa96 100644
--- a/device/bluetooth/bluetooth_socket_chromeos_unittest.cc
+++ b/device/bluetooth/bluetooth_socket_chromeos_unittest.cc
@@ -49,7 +49,7 @@ class BluetoothSocketChromeOSTest : public testing::Test {
last_bytes_received_(0),
last_reason_(BluetoothSocket::kSystemError) {}
- virtual void SetUp() override {
+ void SetUp() override {
scoped_ptr<DBusThreadManagerSetter> dbus_setter =
DBusThreadManager::GetSetterForTesting();
@@ -87,7 +87,7 @@ class BluetoothSocketChromeOSTest : public testing::Test {
ASSERT_TRUE(adapter_->IsPowered());
}
- virtual void TearDown() override {
+ void TearDown() override {
adapter_ = NULL;
BluetoothSocketThread::CleanupForTesting();
DBusThreadManager::Shutdown();
diff --git a/device/nfc/nfc_adapter_chromeos.h b/device/nfc/nfc_adapter_chromeos.h
index 4bf8fd9..62ca341 100644
--- a/device/nfc/nfc_adapter_chromeos.h
+++ b/device/nfc/nfc_adapter_chromeos.h
@@ -29,41 +29,40 @@ class NfcAdapterChromeOS : public device::NfcAdapter,
public chromeos::NfcTagClient::Observer {
public:
// NfcAdapter overrides.
- virtual void AddObserver(NfcAdapter::Observer* observer) override;
- virtual void RemoveObserver(NfcAdapter::Observer* observer) override;
- virtual bool IsPresent() const override;
- virtual bool IsPowered() const override;
- virtual bool IsPolling() const override;
- virtual bool IsInitialized() const override;
- virtual void SetPowered(bool powered,
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
- virtual void StartPolling(const base::Closure& callback,
- const ErrorCallback& error_callback) override;
- virtual void StopPolling(const base::Closure& callback,
- const ErrorCallback& error_callback) override;
+ void AddObserver(NfcAdapter::Observer* observer) override;
+ void RemoveObserver(NfcAdapter::Observer* observer) override;
+ bool IsPresent() const override;
+ bool IsPowered() const override;
+ bool IsPolling() const override;
+ bool IsInitialized() const override;
+ void SetPowered(bool powered,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
+ void StartPolling(const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
+ void StopPolling(const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
private:
friend class device::NfcAdapterFactory;
friend class NfcChromeOSTest;
NfcAdapterChromeOS();
- virtual ~NfcAdapterChromeOS();
+ ~NfcAdapterChromeOS() override;
// NfcAdapterClient::Observer overrides.
- virtual void AdapterAdded(const dbus::ObjectPath& object_path) override;
- virtual void AdapterRemoved(const dbus::ObjectPath& object_path) override;
- virtual void AdapterPropertyChanged(
- const dbus::ObjectPath& object_path,
- const std::string& property_name) override;
+ void AdapterAdded(const dbus::ObjectPath& object_path) override;
+ void AdapterRemoved(const dbus::ObjectPath& object_path) override;
+ void AdapterPropertyChanged(const dbus::ObjectPath& object_path,
+ const std::string& property_name) override;
// NfcDeviceClient::Observer overrides.
- virtual void DeviceAdded(const dbus::ObjectPath& object_path) override;
- virtual void DeviceRemoved(const dbus::ObjectPath& object_path) override;
+ void DeviceAdded(const dbus::ObjectPath& object_path) override;
+ void DeviceRemoved(const dbus::ObjectPath& object_path) override;
// NfcTagClient::Observer overrides.
- virtual void TagAdded(const dbus::ObjectPath& object_path) override;
- virtual void TagRemoved(const dbus::ObjectPath& object_path) override;
+ void TagAdded(const dbus::ObjectPath& object_path) override;
+ void TagRemoved(const dbus::ObjectPath& object_path) override;
// Set the tracked adapter to the one in |object_path|, this object will
// subsequently operate on that adapter until it is removed.
diff --git a/device/nfc/nfc_chromeos_unittest.cc b/device/nfc/nfc_chromeos_unittest.cc
index 090f9da1..0cf3ad9 100644
--- a/device/nfc/nfc_chromeos_unittest.cc
+++ b/device/nfc/nfc_chromeos_unittest.cc
@@ -56,38 +56,35 @@ class TestObserver : public NfcAdapter::Observer,
adapter_(adapter) {
}
- virtual ~TestObserver() {}
+ ~TestObserver() override {}
// NfcAdapter::Observer override.
- virtual void AdapterPresentChanged(NfcAdapter* adapter,
- bool present) override {
+ void AdapterPresentChanged(NfcAdapter* adapter, bool present) override {
EXPECT_EQ(adapter_.get(), adapter);
present_changed_count_++;
}
// NfcAdapter::Observer override.
- virtual void AdapterPoweredChanged(NfcAdapter* adapter,
- bool powered) override {
+ void AdapterPoweredChanged(NfcAdapter* adapter, bool powered) override {
EXPECT_EQ(adapter_.get(), adapter);
powered_changed_count_++;
}
// NfcAdapter::Observer override.
- virtual void AdapterPollingChanged(NfcAdapter* adapter,
- bool powered) override {
+ void AdapterPollingChanged(NfcAdapter* adapter, bool powered) override {
EXPECT_EQ(adapter_.get(), adapter);
polling_changed_count_++;
}
// NfcAdapter::Observer override.
- virtual void PeerFound(NfcAdapter* adapter, NfcPeer* peer) override {
+ void PeerFound(NfcAdapter* adapter, NfcPeer* peer) override {
EXPECT_EQ(adapter_.get(), adapter);
peer_count_++;
peer_identifier_ = peer->GetIdentifier();
}
// NfcAdapter::Observer override.
- virtual void PeerLost(NfcAdapter* adapter, NfcPeer* peer) override {
+ void PeerLost(NfcAdapter* adapter, NfcPeer* peer) override {
EXPECT_EQ(adapter_.get(), adapter);
EXPECT_EQ(peer_identifier_, peer->GetIdentifier());
peer_count_--;
@@ -95,14 +92,14 @@ class TestObserver : public NfcAdapter::Observer,
}
// NfcAdapter::Observer override.
- virtual void TagFound(NfcAdapter* adapter, NfcTag* tag) override {
+ void TagFound(NfcAdapter* adapter, NfcTag* tag) override {
EXPECT_EQ(adapter_.get(), adapter);
tag_count_++;
tag_identifier_ = tag->GetIdentifier();
}
// NfcAdapter::Observer override.
- virtual void TagLost(NfcAdapter* adapter, NfcTag* tag) override {
+ void TagLost(NfcAdapter* adapter, NfcTag* tag) override {
EXPECT_EQ(adapter_.get(), adapter);
EXPECT_EQ(tag_identifier_, tag->GetIdentifier());
tag_count_--;
@@ -110,16 +107,14 @@ class TestObserver : public NfcAdapter::Observer,
}
// NfcPeer::Observer override.
- virtual void RecordReceived(
- NfcPeer* peer, const NfcNdefRecord* record) override {
+ void RecordReceived(NfcPeer* peer, const NfcNdefRecord* record) override {
EXPECT_EQ(peer, adapter_->GetPeer(peer_identifier_));
EXPECT_EQ(peer_identifier_, peer->GetIdentifier());
peer_records_received_count_++;
}
// NfcNdefTagTechnology::Observer override.
- virtual void RecordReceived(
- NfcTag* tag, const NfcNdefRecord* record) override {
+ void RecordReceived(NfcTag* tag, const NfcNdefRecord* record) override {
EXPECT_EQ(tag, adapter_->GetTag(tag_identifier_));
EXPECT_EQ(tag_identifier_, tag->GetIdentifier());
tag_records_received_count_++;
@@ -141,7 +136,7 @@ class TestObserver : public NfcAdapter::Observer,
class NfcChromeOSTest : public testing::Test {
public:
- virtual void SetUp() {
+ void SetUp() override {
DBusThreadManager::Initialize();
fake_nfc_adapter_client_ = static_cast<FakeNfcAdapterClient*>(
DBusThreadManager::Get()->GetNfcAdapterClient());
@@ -159,7 +154,7 @@ class NfcChromeOSTest : public testing::Test {
error_callback_count_ = 0;
}
- virtual void TearDown() {
+ void TearDown() override {
adapter_ = NULL;
DBusThreadManager::Shutdown();
}
diff --git a/device/nfc/nfc_peer_chromeos.h b/device/nfc/nfc_peer_chromeos.h
index c4d8c58..db9e58b 100644
--- a/device/nfc/nfc_peer_chromeos.h
+++ b/device/nfc/nfc_peer_chromeos.h
@@ -21,16 +21,16 @@ class NfcPeerChromeOS : public device::NfcPeer,
public NfcRecordClient::Observer {
public:
// NfcPeer overrides.
- virtual void AddObserver(device::NfcPeer::Observer* observer) override;
- virtual void RemoveObserver(device::NfcPeer::Observer* observer) override;
- virtual std::string GetIdentifier() const override;
- virtual const device::NfcNdefMessage& GetNdefMessage() const override;
- virtual void PushNdef(const device::NfcNdefMessage& message,
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
- virtual void StartHandover(HandoverType handover_type,
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
+ void AddObserver(device::NfcPeer::Observer* observer) override;
+ void RemoveObserver(device::NfcPeer::Observer* observer) override;
+ std::string GetIdentifier() const override;
+ const device::NfcNdefMessage& GetNdefMessage() const override;
+ void PushNdef(const device::NfcNdefMessage& message,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
+ void StartHandover(HandoverType handover_type,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
private:
friend class NfcAdapterChromeOS;
@@ -39,13 +39,12 @@ class NfcPeerChromeOS : public device::NfcPeer,
typedef std::map<dbus::ObjectPath, device::NfcNdefRecord*> NdefRecordMap;
explicit NfcPeerChromeOS(const dbus::ObjectPath& object_path);
- virtual ~NfcPeerChromeOS();
+ ~NfcPeerChromeOS() override;
// NfcRecordClient::Observer overrides.
- virtual void RecordAdded(const dbus::ObjectPath& object_path) override;
- virtual void RecordRemoved(const dbus::ObjectPath& object_path) override;
- virtual void RecordPropertiesReceived(
- const dbus::ObjectPath& object_path) override;
+ void RecordAdded(const dbus::ObjectPath& object_path) override;
+ void RecordRemoved(const dbus::ObjectPath& object_path) override;
+ void RecordPropertiesReceived(const dbus::ObjectPath& object_path) override;
// Called by dbus:: on completion of the D-Bus method call to push an NDEF.
void OnPushNdef(const base::Closure& callback);
diff --git a/device/nfc/nfc_tag_chromeos.h b/device/nfc/nfc_tag_chromeos.h
index 29f7bfb..acddcc5 100644
--- a/device/nfc/nfc_tag_chromeos.h
+++ b/device/nfc/nfc_tag_chromeos.h
@@ -23,22 +23,21 @@ class NfcTagChromeOS : public device::NfcTag,
public NfcTagClient::Observer {
public:
// device::NfcTag overrides.
- virtual void AddObserver(device::NfcTag::Observer* observer) override;
- virtual void RemoveObserver(device::NfcTag::Observer* observer) override;
- virtual std::string GetIdentifier() const override;
- virtual TagType GetType() const override;
- virtual bool IsReadOnly() const override;
- virtual device::NfcTag::Protocol GetSupportedProtocol() const override;
- virtual device::NfcTagTechnology::TechnologyTypeMask
- GetSupportedTechnologies() const override;
- virtual bool IsReady() const override;
- virtual device::NfcNdefTagTechnology* GetNdefTagTechnology() override;
+ void AddObserver(device::NfcTag::Observer* observer) override;
+ void RemoveObserver(device::NfcTag::Observer* observer) override;
+ std::string GetIdentifier() const override;
+ TagType GetType() const override;
+ bool IsReadOnly() const override;
+ device::NfcTag::Protocol GetSupportedProtocol() const override;
+ device::NfcTagTechnology::TechnologyTypeMask GetSupportedTechnologies()
+ const override;
+ bool IsReady() const override;
+ device::NfcNdefTagTechnology* GetNdefTagTechnology() override;
// NfcTagClient::Observer overrides.
- virtual void TagPropertyChanged(const dbus::ObjectPath& object_path,
- const std::string& property_name) override;
- virtual void TagPropertiesReceived(
- const dbus::ObjectPath& object_path) override;
+ void TagPropertyChanged(const dbus::ObjectPath& object_path,
+ const std::string& property_name) override;
+ void TagPropertiesReceived(const dbus::ObjectPath& object_path) override;
// Object path representing the remote tag object.
const dbus::ObjectPath& object_path() const { return object_path_; }
@@ -47,7 +46,7 @@ class NfcTagChromeOS : public device::NfcTag,
friend class NfcAdapterChromeOS;
explicit NfcTagChromeOS(const dbus::ObjectPath& object_path);
- virtual ~NfcTagChromeOS();
+ ~NfcTagChromeOS() override;
// Object path of the tag that we are currently tracking.
dbus::ObjectPath object_path_;
diff --git a/device/nfc/nfc_tag_technology_chromeos.h b/device/nfc/nfc_tag_technology_chromeos.h
index 6f55f43..1e78891 100644
--- a/device/nfc/nfc_tag_technology_chromeos.h
+++ b/device/nfc/nfc_tag_technology_chromeos.h
@@ -24,23 +24,21 @@ class NfcTagChromeOS;
class NfcNdefTagTechnologyChromeOS : public device::NfcNdefTagTechnology,
public NfcRecordClient::Observer {
public:
- virtual ~NfcNdefTagTechnologyChromeOS();
+ ~NfcNdefTagTechnologyChromeOS() override;
// device::NfcNdefTagTechnology overrides.
- virtual void AddObserver(device::NfcNdefTagTechnology::Observer* observer)
- override;
- virtual void RemoveObserver(device::NfcNdefTagTechnology::Observer* observer)
- override;
- virtual const device::NfcNdefMessage& GetNdefMessage() const override;
- virtual void WriteNdef(const device::NfcNdefMessage& message,
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
+ void AddObserver(device::NfcNdefTagTechnology::Observer* observer) override;
+ void RemoveObserver(
+ device::NfcNdefTagTechnology::Observer* observer) override;
+ const device::NfcNdefMessage& GetNdefMessage() const override;
+ void WriteNdef(const device::NfcNdefMessage& message,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
// NfcRecordClient::Observer overrides.
- virtual void RecordAdded(const dbus::ObjectPath& object_path) override;
- virtual void RecordRemoved(const dbus::ObjectPath& object_path) override;
- virtual void RecordPropertiesReceived(
- const dbus::ObjectPath& object_path) override;
+ void RecordAdded(const dbus::ObjectPath& object_path) override;
+ void RecordRemoved(const dbus::ObjectPath& object_path) override;
+ void RecordPropertiesReceived(const dbus::ObjectPath& object_path) override;
private:
friend class NfcTagChromeOS;
diff --git a/device/usb/usb_device_impl.h b/device/usb/usb_device_impl.h
index eca7c98..702b20e 100644
--- a/device/usb/usb_device_impl.h
+++ b/device/usb/usb_device_impl.h
@@ -32,7 +32,7 @@ class UsbDeviceImpl : public UsbDevice {
public:
// UsbDevice implementation:
#if defined(OS_CHROMEOS)
- virtual void RequestUsbAccess(
+ void RequestUsbAccess(
int interface_id,
const base::Callback<void(bool success)>& callback) override;
#endif // OS_CHROMEOS