diff options
author | dcheng <dcheng@chromium.org> | 2015-01-23 08:01:38 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-23 16:03:00 +0000 |
commit | bd5bd4f4972ec164aa7811fb4bbc8fcc116168dd (patch) | |
tree | 3cb8c662a3a1edccc90a49d0c4e7b0d18f260a6e /components/pairing | |
parent | a46fc56cbdf4fa62d3111f91cc81dc598b24b630 (diff) | |
download | chromium_src-bd5bd4f4972ec164aa7811fb4bbc8fcc116168dd.zip chromium_src-bd5bd4f4972ec164aa7811fb4bbc8fcc116168dd.tar.gz chromium_src-bd5bd4f4972ec164aa7811fb4bbc8fcc116168dd.tar.bz2 |
Update {virtual,override,final} to follow C++11 style in components, round 2.
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
Review URL: https://codereview.chromium.org/865973003
Cr-Commit-Position: refs/heads/master@{#312855}
Diffstat (limited to 'components/pairing')
5 files changed, 105 insertions, 121 deletions
diff --git a/components/pairing/bluetooth_controller_pairing_controller.h b/components/pairing/bluetooth_controller_pairing_controller.h index edb79bb..c4a3258 100644 --- a/components/pairing/bluetooth_controller_pairing_controller.h +++ b/components/pairing/bluetooth_controller_pairing_controller.h @@ -30,7 +30,7 @@ class BluetoothControllerPairingController public device::BluetoothDevice::PairingDelegate { public: BluetoothControllerPairingController(); - virtual ~BluetoothControllerPairingController(); + ~BluetoothControllerPairingController() override; private: void ChangeStage(Stage new_stage); @@ -57,56 +57,48 @@ class BluetoothControllerPairingController const std::string& error_message); // ControllerPairingController: - virtual void AddObserver( - ControllerPairingController::Observer* observer) override; - virtual void RemoveObserver( - ControllerPairingController::Observer* observer) override; - virtual Stage GetCurrentStage() override; - virtual void StartPairing() override; - virtual DeviceIdList GetDiscoveredDevices() override; - virtual void ChooseDeviceForPairing(const std::string& device_id) override; - virtual void RepeatDiscovery() override; - virtual std::string GetConfirmationCode() override; - virtual void SetConfirmationCodeIsCorrect(bool correct) override; - virtual void SetHostConfiguration( - bool accepted_eula, - const std::string& lang, - const std::string& timezone, - bool send_reports, - const std::string& keyboard_layout) override; - virtual void OnAuthenticationDone(const std::string& domain, - const std::string& auth_token) override; - virtual void StartSession() override; + void AddObserver(ControllerPairingController::Observer* observer) override; + void RemoveObserver(ControllerPairingController::Observer* observer) override; + Stage GetCurrentStage() override; + void StartPairing() override; + DeviceIdList GetDiscoveredDevices() override; + void ChooseDeviceForPairing(const std::string& device_id) override; + void RepeatDiscovery() override; + std::string GetConfirmationCode() override; + void SetConfirmationCodeIsCorrect(bool correct) override; + void SetHostConfiguration(bool accepted_eula, + const std::string& lang, + const std::string& timezone, + bool send_reports, + const std::string& keyboard_layout) override; + void OnAuthenticationDone(const std::string& domain, + const std::string& auth_token) override; + void StartSession() override; // ProtoDecoder::Observer: - virtual void OnHostStatusMessage( - const pairing_api::HostStatus& message) override; - virtual void OnConfigureHostMessage( + void OnHostStatusMessage(const pairing_api::HostStatus& message) override; + void OnConfigureHostMessage( const pairing_api::ConfigureHost& message) override; - virtual void OnPairDevicesMessage( - const pairing_api::PairDevices& message) override; - virtual void OnCompleteSetupMessage( + void OnPairDevicesMessage(const pairing_api::PairDevices& message) override; + void OnCompleteSetupMessage( const pairing_api::CompleteSetup& message) override; - virtual void OnErrorMessage(const pairing_api::Error& message) override; + void OnErrorMessage(const pairing_api::Error& message) override; // BluetoothAdapter::Observer: - virtual void DeviceAdded(device::BluetoothAdapter* adapter, - device::BluetoothDevice* device) override; - virtual void DeviceRemoved(device::BluetoothAdapter* adapter, - device::BluetoothDevice* device) override; + void DeviceAdded(device::BluetoothAdapter* adapter, + device::BluetoothDevice* device) override; + void DeviceRemoved(device::BluetoothAdapter* adapter, + device::BluetoothDevice* device) override; // device::BluetoothDevice::PairingDelegate: - virtual void RequestPinCode(device::BluetoothDevice* device) override; - virtual void RequestPasskey(device::BluetoothDevice* device) override; - virtual void DisplayPinCode(device::BluetoothDevice* device, - const std::string& pincode) override; - virtual void DisplayPasskey(device::BluetoothDevice* device, - uint32 passkey) override; - virtual void KeysEntered(device::BluetoothDevice* device, - uint32 entered) override; - virtual void ConfirmPasskey(device::BluetoothDevice* device, - uint32 passkey) override; - virtual void AuthorizePairing(device::BluetoothDevice* device) override; + void RequestPinCode(device::BluetoothDevice* device) override; + void RequestPasskey(device::BluetoothDevice* device) override; + void DisplayPinCode(device::BluetoothDevice* device, + const std::string& pincode) override; + void DisplayPasskey(device::BluetoothDevice* device, uint32 passkey) override; + void KeysEntered(device::BluetoothDevice* device, uint32 entered) override; + void ConfirmPasskey(device::BluetoothDevice* device, uint32 passkey) override; + void AuthorizePairing(device::BluetoothDevice* device) override; Stage current_stage_; scoped_refptr<device::BluetoothAdapter> adapter_; diff --git a/components/pairing/bluetooth_host_pairing_controller.h b/components/pairing/bluetooth_host_pairing_controller.h index 5a1dc744..9c50f5c 100644 --- a/components/pairing/bluetooth_host_pairing_controller.h +++ b/components/pairing/bluetooth_host_pairing_controller.h @@ -35,7 +35,7 @@ class BluetoothHostPairingController typedef HostPairingController::Observer Observer; BluetoothHostPairingController(); - virtual ~BluetoothHostPairingController(); + ~BluetoothHostPairingController() override; private: void ChangeStage(Stage new_stage); @@ -62,44 +62,38 @@ class BluetoothHostPairingController const std::string& error_message); // HostPairingController: - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual Stage GetCurrentStage() override; - virtual void StartPairing() override; - virtual std::string GetDeviceName() override; - virtual std::string GetConfirmationCode() override; - virtual std::string GetEnrollmentDomain() override; - virtual void OnUpdateStatusChanged(UpdateStatus update_status) override; - virtual void OnEnrollmentStatusChanged( - EnrollmentStatus enrollment_status) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + Stage GetCurrentStage() override; + void StartPairing() override; + std::string GetDeviceName() override; + std::string GetConfirmationCode() override; + std::string GetEnrollmentDomain() override; + void OnUpdateStatusChanged(UpdateStatus update_status) override; + void OnEnrollmentStatusChanged(EnrollmentStatus enrollment_status) override; // ProtoDecoder::Observer: - virtual void OnHostStatusMessage( - const pairing_api::HostStatus& message) override; - virtual void OnConfigureHostMessage( + void OnHostStatusMessage(const pairing_api::HostStatus& message) override; + void OnConfigureHostMessage( const pairing_api::ConfigureHost& message) override; - virtual void OnPairDevicesMessage( - const pairing_api::PairDevices& message) override; - virtual void OnCompleteSetupMessage( + void OnPairDevicesMessage(const pairing_api::PairDevices& message) override; + void OnCompleteSetupMessage( const pairing_api::CompleteSetup& message) override; - virtual void OnErrorMessage(const pairing_api::Error& message) override; + void OnErrorMessage(const pairing_api::Error& message) override; // BluetoothAdapter::Observer: - virtual void AdapterPresentChanged(device::BluetoothAdapter* adapter, - bool present) override; + void AdapterPresentChanged(device::BluetoothAdapter* adapter, + bool present) override; // device::BluetoothDevice::PairingDelegate: - virtual void RequestPinCode(device::BluetoothDevice* device) override; - virtual void RequestPasskey(device::BluetoothDevice* device) override; - virtual void DisplayPinCode(device::BluetoothDevice* device, - const std::string& pincode) override; - virtual void DisplayPasskey(device::BluetoothDevice* device, - uint32 passkey) override; - virtual void KeysEntered(device::BluetoothDevice* device, - uint32 entered) override; - virtual void ConfirmPasskey(device::BluetoothDevice* device, - uint32 passkey) override; - virtual void AuthorizePairing(device::BluetoothDevice* device) override; + void RequestPinCode(device::BluetoothDevice* device) override; + void RequestPasskey(device::BluetoothDevice* device) override; + void DisplayPinCode(device::BluetoothDevice* device, + const std::string& pincode) override; + void DisplayPasskey(device::BluetoothDevice* device, uint32 passkey) override; + void KeysEntered(device::BluetoothDevice* device, uint32 entered) override; + void ConfirmPasskey(device::BluetoothDevice* device, uint32 passkey) override; + void AuthorizePairing(device::BluetoothDevice* device) override; Stage current_stage_; std::string device_name_; diff --git a/components/pairing/fake_controller_pairing_controller.h b/components/pairing/fake_controller_pairing_controller.h index edb3666..c1801e2 100644 --- a/components/pairing/fake_controller_pairing_controller.h +++ b/components/pairing/fake_controller_pairing_controller.h @@ -37,7 +37,7 @@ class FakeControllerPairingController // * code - 6 digits or empty string. Default: empty string. If strings is // empty, random code is generated. explicit FakeControllerPairingController(const std::string& config); - virtual ~FakeControllerPairingController(); + ~FakeControllerPairingController() override; // Applies given |config| to controller. void ApplyConfig(const std::string& config); @@ -64,24 +64,23 @@ class FakeControllerPairingController void SetDiscoveryScenario(const DiscoveryScenario& discovery_scenario); // Overridden from ControllerPairingController: - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual Stage GetCurrentStage() override; - virtual void StartPairing() override; - virtual DeviceIdList GetDiscoveredDevices() override; - virtual void ChooseDeviceForPairing(const std::string& device_id) override; - virtual void RepeatDiscovery() override; - virtual std::string GetConfirmationCode() override; - virtual void SetConfirmationCodeIsCorrect(bool correct) override; - virtual void SetHostConfiguration( - bool accepted_eula, - const std::string& lang, - const std::string& timezone, - bool send_reports, - const std::string& keyboard_layout) override; - virtual void OnAuthenticationDone(const std::string& domain, - const std::string& auth_token) override; - virtual void StartSession() override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + Stage GetCurrentStage() override; + void StartPairing() override; + DeviceIdList GetDiscoveredDevices() override; + void ChooseDeviceForPairing(const std::string& device_id) override; + void RepeatDiscovery() override; + std::string GetConfirmationCode() override; + void SetConfirmationCodeIsCorrect(bool correct) override; + void SetHostConfiguration(bool accepted_eula, + const std::string& lang, + const std::string& timezone, + bool send_reports, + const std::string& keyboard_layout) override; + void OnAuthenticationDone(const std::string& domain, + const std::string& auth_token) override; + void StartSession() override; private: void ChangeStage(Stage new_stage); @@ -91,8 +90,8 @@ class FakeControllerPairingController void DeviceLost(const std::string& device_id); // Overridden from ui::ControllerPairingController::Observer: - virtual void PairingStageChanged(Stage new_stage) override; - virtual void DiscoveredDevicesListChanged() override; + void PairingStageChanged(Stage new_stage) override; + void DiscoveredDevicesListChanged() override; ObserverList<ControllerPairingController::Observer> observers_; Stage current_stage_; diff --git a/components/pairing/fake_host_pairing_controller.h b/components/pairing/fake_host_pairing_controller.h index 48335ce..8ef2f4b 100644 --- a/components/pairing/fake_host_pairing_controller.h +++ b/components/pairing/fake_host_pairing_controller.h @@ -28,7 +28,7 @@ class FakeHostPairingController // * device_name - string. Default: "Chromebox-01". // * domain - string. Default: "example.com". explicit FakeHostPairingController(const std::string& config); - virtual ~FakeHostPairingController(); + ~FakeHostPairingController() override; // Applies given |config| to flow. void ApplyConfig(const std::string& config); @@ -38,25 +38,24 @@ class FakeHostPairingController void ChangeStageLater(Stage new_stage); // HostPairingController: - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual Stage GetCurrentStage() override; - virtual void StartPairing() override; - virtual std::string GetDeviceName() override; - virtual std::string GetConfirmationCode() override; - virtual std::string GetEnrollmentDomain() override; - virtual void OnUpdateStatusChanged(UpdateStatus update_status) override; - virtual void OnEnrollmentStatusChanged( - EnrollmentStatus enrollment_status) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + Stage GetCurrentStage() override; + void StartPairing() override; + std::string GetDeviceName() override; + std::string GetConfirmationCode() override; + std::string GetEnrollmentDomain() override; + void OnUpdateStatusChanged(UpdateStatus update_status) override; + void OnEnrollmentStatusChanged(EnrollmentStatus enrollment_status) override; // HostPairingController::Observer: - virtual void PairingStageChanged(Stage new_stage) override; - virtual void ConfigureHost(bool accepted_eula, - const std::string& lang, - const std::string& timezone, - bool send_reports, - const std::string& keyboard_layout) override; - virtual void EnrollHost(const std::string& auth_token) override; + void PairingStageChanged(Stage new_stage) override; + void ConfigureHost(bool accepted_eula, + const std::string& lang, + const std::string& timezone, + bool send_reports, + const std::string& keyboard_layout) override; + void EnrollHost(const std::string& auth_token) override; ObserverList<Observer> observers_; Stage current_stage_; diff --git a/components/pairing/shark_connection_listener.h b/components/pairing/shark_connection_listener.h index e2f9b06..98a7829 100644 --- a/components/pairing/shark_connection_listener.h +++ b/components/pairing/shark_connection_listener.h @@ -23,19 +23,19 @@ class SharkConnectionListener : public HostPairingController::Observer { OnConnectedCallback; explicit SharkConnectionListener(OnConnectedCallback callback); - virtual ~SharkConnectionListener(); + ~SharkConnectionListener() override; private: typedef HostPairingController::Stage Stage; // HostPairingController::Observer overrides: - virtual void PairingStageChanged(Stage new_stage) override; - virtual void ConfigureHost(bool accepted_eula, - const std::string& lang, - const std::string& timezone, - bool send_reports, - const std::string& keyboard_layout) override; - virtual void EnrollHost(const std::string& auth_token) override; + void PairingStageChanged(Stage new_stage) override; + void ConfigureHost(bool accepted_eula, + const std::string& lang, + const std::string& timezone, + bool send_reports, + const std::string& keyboard_layout) override; + void EnrollHost(const std::string& auth_token) override; OnConnectedCallback callback_; scoped_ptr<HostPairingController> controller_; |