summaryrefslogtreecommitdiffstats
path: root/content/browser/geolocation
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-10-27 18:13:42 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-28 01:13:59 +0000
commitfa85b15991d5df67e3adf18a46a1c0fdca163568 (patch)
tree6fd4da7fd211f67f9ccfdc05455b5a0c6537bab5 /content/browser/geolocation
parentb5a19d4ffc9184ec221d46a88b4afa5071eb1527 (diff)
downloadchromium_src-fa85b15991d5df67e3adf18a46a1c0fdca163568.zip
chromium_src-fa85b15991d5df67e3adf18a46a1c0fdca163568.tar.gz
chromium_src-fa85b15991d5df67e3adf18a46a1c0fdca163568.tar.bz2
Standardize usage of virtual/override/final specifiers.
The Google C++ style guide states: Explicitly annotate overrides of virtual functions or virtual destructors with an override or (less frequently) final specifier. Older (pre-C++11) code will use the virtual keyword as an inferior alternative annotation. For clarity, use exactly one of override, final, or virtual when declaring an override. To better conform to these guidelines, the following constructs have been rewritten: - if a base class has a virtual destructor, then: virtual ~Foo(); -> ~Foo() override; - virtual void Foo() override; -> void Foo() override; - virtual void Foo() override final; -> void Foo() final; This patch was automatically generated. The clang plugin can generate fixit hints, which are suggested edits when it is 100% sure it knows how to fix a problem. The hints from the clang plugin were applied to the source tree using the tool in https://codereview.chromium.org/598073004. BUG=417463 R=nasko@chromium.org Review URL: https://codereview.chromium.org/678073006 Cr-Commit-Position: refs/heads/master@{#301534}
Diffstat (limited to 'content/browser/geolocation')
-rw-r--r--content/browser/geolocation/geolocation_provider_impl_unittest.cc2
-rw-r--r--content/browser/geolocation/location_arbitrator_impl_unittest.cc5
-rw-r--r--content/browser/geolocation/network_location_provider_unittest.cc6
-rw-r--r--content/browser/geolocation/wifi_data_provider_common_unittest.cc4
-rw-r--r--content/browser/geolocation/wifi_data_provider_linux.cc4
-rw-r--r--content/browser/geolocation/wifi_data_provider_linux.h6
-rw-r--r--content/browser/geolocation/wifi_data_provider_linux_unittest.cc2
7 files changed, 15 insertions, 14 deletions
diff --git a/content/browser/geolocation/geolocation_provider_impl_unittest.cc b/content/browser/geolocation/geolocation_provider_impl_unittest.cc
index 47275e1..f201f48 100644
--- a/content/browser/geolocation/geolocation_provider_impl_unittest.cc
+++ b/content/browser/geolocation/geolocation_provider_impl_unittest.cc
@@ -118,7 +118,7 @@ class GeolocationProviderTest : public testing::Test {
provider_(new LocationProviderForTestArbitrator) {
}
- virtual ~GeolocationProviderTest() {}
+ ~GeolocationProviderTest() override {}
LocationProviderForTestArbitrator* provider() { return provider_.get(); }
diff --git a/content/browser/geolocation/location_arbitrator_impl_unittest.cc b/content/browser/geolocation/location_arbitrator_impl_unittest.cc
index f5142fa..bd5eb6e 100644
--- a/content/browser/geolocation/location_arbitrator_impl_unittest.cc
+++ b/content/browser/geolocation/location_arbitrator_impl_unittest.cc
@@ -105,7 +105,7 @@ class TestingLocationArbitrator : public LocationArbitratorImpl {
class GeolocationLocationArbitratorTest : public testing::Test {
protected:
// testing::Test
- virtual void SetUp() {
+ void SetUp() override {
access_token_store_ = new NiceMock<FakeAccessTokenStore>;
observer_.reset(new MockLocationObserver);
LocationArbitratorImpl::LocationUpdateCallback callback =
@@ -116,8 +116,7 @@ class GeolocationLocationArbitratorTest : public testing::Test {
}
// testing::Test
- virtual void TearDown() {
- }
+ void TearDown() override {}
void CheckLastPositionInfo(double latitude,
double longitude,
diff --git a/content/browser/geolocation/network_location_provider_unittest.cc b/content/browser/geolocation/network_location_provider_unittest.cc
index 881ec68..b8ef6ca 100644
--- a/content/browser/geolocation/network_location_provider_unittest.cc
+++ b/content/browser/geolocation/network_location_provider_unittest.cc
@@ -107,13 +107,15 @@ MockWifiDataProvider* MockWifiDataProvider::instance_ = NULL;
// Main test fixture
class GeolocationNetworkProviderTest : public testing::Test {
public:
- virtual void SetUp() {
+ void SetUp() override {
test_server_url_ = GURL(kTestServerUrl);
access_token_store_ = new FakeAccessTokenStore;
wifi_data_provider_ = MockWifiDataProvider::CreateInstance();
}
- virtual void TearDown() { WifiDataProviderManager::ResetFactoryForTesting(); }
+ void TearDown() override {
+ WifiDataProviderManager::ResetFactoryForTesting();
+ }
LocationProvider* CreateProvider(bool set_permission_granted) {
LocationProvider* provider = NewNetworkLocationProvider(
diff --git a/content/browser/geolocation/wifi_data_provider_common_unittest.cc b/content/browser/geolocation/wifi_data_provider_common_unittest.cc
index 01a6ffb..53d44bc 100644
--- a/content/browser/geolocation/wifi_data_provider_common_unittest.cc
+++ b/content/browser/geolocation/wifi_data_provider_common_unittest.cc
@@ -113,13 +113,13 @@ class GeolocationWifiDataProviderCommonTest : public testing::Test {
: loop_quitter_(&main_message_loop_) {
}
- virtual void SetUp() {
+ void SetUp() override {
provider_ = new WifiDataProviderCommonWithMock;
wlan_api_ = provider_->new_wlan_api_.get();
polling_policy_ = provider_->new_polling_policy_.get();
provider_->AddCallback(&loop_quitter_.callback_);
}
- virtual void TearDown() {
+ void TearDown() override {
provider_->RemoveCallback(&loop_quitter_.callback_);
provider_->StopDataProvider();
provider_ = NULL;
diff --git a/content/browser/geolocation/wifi_data_provider_linux.cc b/content/browser/geolocation/wifi_data_provider_linux.cc
index ccda299..1909abf 100644
--- a/content/browser/geolocation/wifi_data_provider_linux.cc
+++ b/content/browser/geolocation/wifi_data_provider_linux.cc
@@ -40,7 +40,7 @@ enum { NM_DEVICE_TYPE_WIFI = 2 };
class NetworkManagerWlanApi : public WifiDataProviderCommon::WlanApiInterface {
public:
NetworkManagerWlanApi();
- virtual ~NetworkManagerWlanApi();
+ ~NetworkManagerWlanApi() override;
// Must be called before any other interface method. Will return false if the
// NetworkManager session cannot be created (e.g. not present on this distro),
@@ -54,7 +54,7 @@ class NetworkManagerWlanApi : public WifiDataProviderCommon::WlanApiInterface {
//
// This function makes blocking D-Bus calls, but it's totally fine as
// the code runs in "Geolocation" thread, not the browser's UI thread.
- virtual bool GetAccessPointData(WifiData::AccessPointDataSet* data) override;
+ bool GetAccessPointData(WifiData::AccessPointDataSet* data) override;
private:
// Enumerates the list of available network adapter devices known to
diff --git a/content/browser/geolocation/wifi_data_provider_linux.h b/content/browser/geolocation/wifi_data_provider_linux.h
index d07e0f5..4858425 100644
--- a/content/browser/geolocation/wifi_data_provider_linux.h
+++ b/content/browser/geolocation/wifi_data_provider_linux.h
@@ -22,11 +22,11 @@ class CONTENT_EXPORT WifiDataProviderLinux : public WifiDataProviderCommon {
private:
friend class GeolocationWifiDataProviderLinuxTest;
- virtual ~WifiDataProviderLinux();
+ ~WifiDataProviderLinux() override;
// WifiDataProviderCommon
- virtual WlanApiInterface* NewWlanApi() override;
- virtual WifiPollingPolicy* NewPollingPolicy() override;
+ WlanApiInterface* NewWlanApi() override;
+ WifiPollingPolicy* NewPollingPolicy() override;
// For testing.
WlanApiInterface* NewWlanApiForTesting(dbus::Bus* bus);
diff --git a/content/browser/geolocation/wifi_data_provider_linux_unittest.cc b/content/browser/geolocation/wifi_data_provider_linux_unittest.cc
index 498b230..5a4b546 100644
--- a/content/browser/geolocation/wifi_data_provider_linux_unittest.cc
+++ b/content/browser/geolocation/wifi_data_provider_linux_unittest.cc
@@ -24,7 +24,7 @@ using ::testing::Unused;
namespace content {
class GeolocationWifiDataProviderLinuxTest : public testing::Test {
- virtual void SetUp() {
+ void SetUp() override {
// Create a mock bus.
dbus::Bus::Options options;
options.bus_type = dbus::Bus::SYSTEM;