diff options
author | dcheng <dcheng@chromium.org> | 2015-02-05 19:42:57 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-06 03:44:26 +0000 |
commit | e6c6db7d6e4f367f8a5205a034e972eea3a348c9 (patch) | |
tree | 31d39d6c51ede38b7074329a8d1677e13716c975 | |
parent | c0107ee59bdb5b6337f7bbdb4e8210c0bfeb547b (diff) | |
download | chromium_src-e6c6db7d6e4f367f8a5205a034e972eea3a348c9.zip chromium_src-e6c6db7d6e4f367f8a5205a034e972eea3a348c9.tar.gz chromium_src-e6c6db7d6e4f367f8a5205a034e972eea3a348c9.tar.bz2 |
Update {virtual,override,final} to follow C++11 style in net.
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 an OS=android build using a
variation of https://codereview.chromium.org/598073004.
BUG=417463
Review URL: https://codereview.chromium.org/897423002
Cr-Commit-Position: refs/heads/master@{#314964}
-rw-r--r-- | net/android/network_change_notifier_android.cc | 10 | ||||
-rw-r--r-- | net/android/network_change_notifier_android.h | 10 | ||||
-rw-r--r-- | net/android/network_change_notifier_android_unittest.cc | 12 | ||||
-rw-r--r-- | net/android/network_change_notifier_factory_android.h | 4 | ||||
-rw-r--r-- | net/cert/cert_verify_proc_android.h | 16 | ||||
-rw-r--r-- | net/dns/dns_config_service_posix.cc | 5 | ||||
-rw-r--r-- | net/proxy/proxy_config_service_android.cc | 14 | ||||
-rw-r--r-- | net/proxy/proxy_config_service_android.h | 8 | ||||
-rw-r--r-- | net/proxy/proxy_config_service_android_unittest.cc | 10 | ||||
-rw-r--r-- | net/test/spawned_test_server/remote_test_server.h | 2 | ||||
-rw-r--r-- | net/test/spawned_test_server/spawner_communicator.cc | 2 | ||||
-rw-r--r-- | net/test/spawned_test_server/spawner_communicator.h | 6 |
12 files changed, 45 insertions, 54 deletions
diff --git a/net/android/network_change_notifier_android.cc b/net/android/network_change_notifier_android.cc index 0a109b8..d1ad338 100644 --- a/net/android/network_change_notifier_android.cc +++ b/net/android/network_change_notifier_android.cc @@ -77,20 +77,16 @@ class NetworkChangeNotifierAndroid::DnsConfigServiceThread // We're only interested in tunnel interface changes. base::Bind(NotifyNetworkChangeNotifierObservers)) {} - virtual ~DnsConfigServiceThread() { - Stop(); - } + ~DnsConfigServiceThread() override { Stop(); } - virtual void Init() override { + void Init() override { address_tracker_.Init(); dns_config_service_ = DnsConfigService::CreateSystemService(); dns_config_service_->WatchConfig( base::Bind(&NetworkChangeNotifier::SetDnsConfig)); } - virtual void CleanUp() override { - dns_config_service_.reset(); - } + void CleanUp() override { dns_config_service_.reset(); } static void NotifyNetworkChangeNotifierObservers() { NetworkChangeNotifier::NotifyObserversOfIPAddressChange(); diff --git a/net/android/network_change_notifier_android.h b/net/android/network_change_notifier_android.h index 0d90a56..f6d43d0 100644 --- a/net/android/network_change_notifier_android.h +++ b/net/android/network_change_notifier_android.h @@ -42,17 +42,17 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierAndroid : public NetworkChangeNotifier, public NetworkChangeNotifierDelegateAndroid::Observer { public: - virtual ~NetworkChangeNotifierAndroid(); + ~NetworkChangeNotifierAndroid() override; // NetworkChangeNotifier: - virtual ConnectionType GetCurrentConnectionType() const override; + ConnectionType GetCurrentConnectionType() const override; // Requires ACCESS_WIFI_STATE permission in order to provide precise WiFi link // speed. - virtual double GetCurrentMaxBandwidth() const override; + double GetCurrentMaxBandwidth() const override; // NetworkChangeNotifierDelegateAndroid::Observer: - virtual void OnConnectionTypeChanged() override; - virtual void OnMaxBandwidthChanged(double max_bandwidth_mbps) override; + void OnConnectionTypeChanged() override; + void OnMaxBandwidthChanged(double max_bandwidth_mbps) override; static bool Register(JNIEnv* env); diff --git a/net/android/network_change_notifier_android_unittest.cc b/net/android/network_change_notifier_android_unittest.cc index 54e5583..83dd70e 100644 --- a/net/android/network_change_notifier_android_unittest.cc +++ b/net/android/network_change_notifier_android_unittest.cc @@ -25,11 +25,9 @@ class NetworkChangeNotifierDelegateAndroidObserver : type_notifications_count_(0), max_bandwidth_notifications_count_(0) {} // NetworkChangeNotifierDelegateAndroid::Observer: - virtual void OnConnectionTypeChanged() override { - type_notifications_count_++; - } + void OnConnectionTypeChanged() override { type_notifications_count_++; } - virtual void OnMaxBandwidthChanged(double max_bandwidth_mbps) override { + void OnMaxBandwidthChanged(double max_bandwidth_mbps) override { max_bandwidth_notifications_count_++; } @@ -49,7 +47,7 @@ class NetworkChangeNotifierObserver NetworkChangeNotifierObserver() : notifications_count_(0) {} // NetworkChangeNotifier::Observer: - virtual void OnConnectionTypeChanged( + void OnConnectionTypeChanged( NetworkChangeNotifier::ConnectionType connection_type) override { notifications_count_++; } @@ -68,7 +66,7 @@ class BaseNetworkChangeNotifierAndroidTest : public testing::Test { protected: typedef NetworkChangeNotifier::ConnectionType ConnectionType; - virtual ~BaseNetworkChangeNotifierAndroidTest() {} + ~BaseNetworkChangeNotifierAndroidTest() override {} void RunTest( const base::Callback<int(void)>& notifications_count_getter, @@ -148,7 +146,7 @@ class NetworkChangeNotifierDelegateAndroidTest delegate_.AddObserver(&other_delegate_observer_); } - virtual ~NetworkChangeNotifierDelegateAndroidTest() { + ~NetworkChangeNotifierDelegateAndroidTest() override { delegate_.RemoveObserver(&delegate_observer_); delegate_.RemoveObserver(&other_delegate_observer_); } diff --git a/net/android/network_change_notifier_factory_android.h b/net/android/network_change_notifier_factory_android.h index d443fcd..035a84e 100644 --- a/net/android/network_change_notifier_factory_android.h +++ b/net/android/network_change_notifier_factory_android.h @@ -26,10 +26,10 @@ class NET_EXPORT NetworkChangeNotifierFactoryAndroid : NetworkChangeNotifierFactoryAndroid(); // Must be called on the JNI thread. - virtual ~NetworkChangeNotifierFactoryAndroid(); + ~NetworkChangeNotifierFactoryAndroid() override; // NetworkChangeNotifierFactory: - virtual NetworkChangeNotifier* CreateInstance() override; + NetworkChangeNotifier* CreateInstance() override; private: // Delegate passed to the instances created by this class. diff --git a/net/cert/cert_verify_proc_android.h b/net/cert/cert_verify_proc_android.h index 7002718..6830df6 100644 --- a/net/cert/cert_verify_proc_android.h +++ b/net/cert/cert_verify_proc_android.h @@ -15,18 +15,18 @@ class CertVerifyProcAndroid : public CertVerifyProc { public: CertVerifyProcAndroid(); - virtual bool SupportsAdditionalTrustAnchors() const override; + bool SupportsAdditionalTrustAnchors() const override; protected: - virtual ~CertVerifyProcAndroid(); + ~CertVerifyProcAndroid() override; private: - virtual int VerifyInternal(X509Certificate* cert, - const std::string& hostname, - int flags, - CRLSet* crl_set, - const CertificateList& additional_trust_anchors, - CertVerifyResult* verify_result) override; + int VerifyInternal(X509Certificate* cert, + const std::string& hostname, + int flags, + CRLSet* crl_set, + const CertificateList& additional_trust_anchors, + CertVerifyResult* verify_result) override; }; } // namespace net diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc index 4f6888b..135f3fd 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc @@ -64,7 +64,7 @@ class DnsConfigWatcher : public NetworkChangeNotifier::NetworkChangeObserver { NetworkChangeNotifier::AddNetworkChangeObserver(this); } - virtual ~DnsConfigWatcher() { + ~DnsConfigWatcher() override { NetworkChangeNotifier::RemoveNetworkChangeObserver(this); } @@ -73,8 +73,7 @@ class DnsConfigWatcher : public NetworkChangeNotifier::NetworkChangeObserver { return true; } - virtual void OnNetworkChanged(NetworkChangeNotifier::ConnectionType type) - override { + void OnNetworkChanged(NetworkChangeNotifier::ConnectionType type) override { if (!callback_.is_null() && type != NetworkChangeNotifier::CONNECTION_NONE) callback_.Run(true); } diff --git a/net/proxy/proxy_config_service_android.cc b/net/proxy/proxy_config_service_android.cc index 80e3b92..503388a 100644 --- a/net/proxy/proxy_config_service_android.cc +++ b/net/proxy/proxy_config_service_android.cc @@ -302,12 +302,12 @@ class ProxyConfigServiceAndroid::Delegate explicit JNIDelegateImpl(Delegate* delegate) : delegate_(delegate) {} // ProxyConfigServiceAndroid::JNIDelegate overrides. - virtual void ProxySettingsChangedTo(JNIEnv* env, - jobject jself, - jstring jhost, - jint jport, - jstring jpac_url, - jobjectArray jexclusion_list) override { + void ProxySettingsChangedTo(JNIEnv* env, + jobject jself, + jstring jhost, + jint jport, + jstring jpac_url, + jobjectArray jexclusion_list) override { std::string host = ConvertJavaStringToUTF8(env, jhost); std::string pac_url; if (jpac_url) @@ -318,7 +318,7 @@ class ProxyConfigServiceAndroid::Delegate delegate_->ProxySettingsChangedTo(host, jport, pac_url, exclusion_list); } - virtual void ProxySettingsChanged(JNIEnv* env, jobject self) override { + void ProxySettingsChanged(JNIEnv* env, jobject self) override { delegate_->ProxySettingsChanged(); } diff --git a/net/proxy/proxy_config_service_android.h b/net/proxy/proxy_config_service_android.h index cb15bc5..64e6b49 100644 --- a/net/proxy/proxy_config_service_android.h +++ b/net/proxy/proxy_config_service_android.h @@ -59,7 +59,7 @@ class NET_EXPORT ProxyConfigServiceAndroid : public ProxyConfigService { const scoped_refptr<base::SequencedTaskRunner>& network_task_runner, const scoped_refptr<base::SequencedTaskRunner>& jni_task_runner); - virtual ~ProxyConfigServiceAndroid(); + ~ProxyConfigServiceAndroid() override; // Register JNI bindings. static bool Register(JNIEnv* env); @@ -71,9 +71,9 @@ class NET_EXPORT ProxyConfigServiceAndroid : public ProxyConfigService { // ProxyConfigService: // Called only on the network thread. - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override; private: friend class ProxyConfigServiceAndroidTestBase; diff --git a/net/proxy/proxy_config_service_android_unittest.cc b/net/proxy/proxy_config_service_android_unittest.cc index 41f2387..2e4f7bb 100644 --- a/net/proxy/proxy_config_service_android_unittest.cc +++ b/net/proxy/proxy_config_service_android_unittest.cc @@ -23,7 +23,7 @@ class TestObserver : public ProxyConfigService::Observer { TestObserver() : availability_(ProxyConfigService::CONFIG_UNSET) {} // ProxyConfigService::Observer: - virtual void OnProxyConfigChanged( + void OnProxyConfigChanged( const ProxyConfig& config, ProxyConfigService::ConfigAvailability availability) override { config_ = config; @@ -59,17 +59,15 @@ class ProxyConfigServiceAndroidTestBase : public testing::Test { base::Bind(&ProxyConfigServiceAndroidTestBase::GetProperty, base::Unretained(this))) {} - virtual ~ProxyConfigServiceAndroidTestBase() {} + ~ProxyConfigServiceAndroidTestBase() override {} // testing::Test: - virtual void SetUp() override { + void SetUp() override { message_loop_->RunUntilIdle(); service_.AddObserver(&observer_); } - virtual void TearDown() override { - service_.RemoveObserver(&observer_); - } + void TearDown() override { service_.RemoveObserver(&observer_); } void ClearConfiguration() { configuration_.clear(); diff --git a/net/test/spawned_test_server/remote_test_server.h b/net/test/spawned_test_server/remote_test_server.h index de12e4e..a8b8bb2 100644 --- a/net/test/spawned_test_server/remote_test_server.h +++ b/net/test/spawned_test_server/remote_test_server.h @@ -29,7 +29,7 @@ class RemoteTestServer : public BaseTestServer { const SSLOptions& ssl_options, const base::FilePath& document_root); - virtual ~RemoteTestServer(); + ~RemoteTestServer() override; // Starts the Python test server on the host, instead of on the device, and // blocks until the server is ready. diff --git a/net/test/spawned_test_server/spawner_communicator.cc b/net/test/spawned_test_server/spawner_communicator.cc index 53484ea..bb1b445 100644 --- a/net/test/spawned_test_server/spawner_communicator.cc +++ b/net/test/spawned_test_server/spawner_communicator.cc @@ -47,7 +47,7 @@ class SpawnerRequestData : public base::SupportsUserData::Data { data_received_->clear(); } - virtual ~SpawnerRequestData() {} + ~SpawnerRequestData() override {} bool DoesRequestIdMatch(int request_id) const { return request_id_ == request_id; diff --git a/net/test/spawned_test_server/spawner_communicator.h b/net/test/spawned_test_server/spawner_communicator.h index 549ad91..ba8bfca 100644 --- a/net/test/spawned_test_server/spawner_communicator.h +++ b/net/test/spawned_test_server/spawner_communicator.h @@ -61,7 +61,7 @@ class ScopedPortException; class SpawnerCommunicator : public net::URLRequest::Delegate { public: explicit SpawnerCommunicator(uint16 port); - virtual ~SpawnerCommunicator(); + ~SpawnerCommunicator() override; // Starts an instance of the Python test server on the host/ machine. // If successfully started, returns true, setting |*port| to the port @@ -100,8 +100,8 @@ class SpawnerCommunicator : public net::URLRequest::Delegate { std::string* data_received); // URLRequest::Delegate methods. Called on the IO thread. - virtual void OnResponseStarted(URLRequest* request) override; - virtual void OnReadCompleted(URLRequest* request, int num_bytes) override; + void OnResponseStarted(URLRequest* request) override; + void OnReadCompleted(URLRequest* request, int num_bytes) override; // Reads Result from the response. Called on the IO thread. void ReadResult(URLRequest* request); |