diff options
author | dcheng <dcheng@chromium.org> | 2014-10-27 14:47:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-27 21:48:18 +0000 |
commit | 67be2b1f8dbb8fe664365ce33cd6ccf2832e0663 (patch) | |
tree | 463de616ca38e98329059fff1709f9f0b8aa5a80 /net/http | |
parent | acfeaee6661ddd4cb0309a6faed1f4aeb8d24853 (diff) | |
download | chromium_src-67be2b1f8dbb8fe664365ce33cd6ccf2832e0663.zip chromium_src-67be2b1f8dbb8fe664365ce33cd6ccf2832e0663.tar.gz chromium_src-67be2b1f8dbb8fe664365ce33cd6ccf2832e0663.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=pauljensen@chromium.org
Review URL: https://codereview.chromium.org/663043004
Cr-Commit-Position: refs/heads/master@{#301452}
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_auth_handler_negotiate_unittest.cc | 2 | ||||
-rw-r--r-- | net/http/http_network_layer_unittest.cc | 2 | ||||
-rw-r--r-- | net/http/http_network_transaction_ssl_unittest.cc | 2 | ||||
-rw-r--r-- | net/http/http_network_transaction_unittest.cc | 4 | ||||
-rw-r--r-- | net/http/http_response_body_drainer_unittest.cc | 2 | ||||
-rw-r--r-- | net/http/http_server_properties_manager_unittest.cc | 4 | ||||
-rw-r--r-- | net/http/transport_security_persister_unittest.cc | 4 | ||||
-rw-r--r-- | net/http/transport_security_state_unittest.cc | 2 |
8 files changed, 11 insertions, 11 deletions
diff --git a/net/http/http_auth_handler_negotiate_unittest.cc b/net/http/http_auth_handler_negotiate_unittest.cc index 64521a6..233597d 100644 --- a/net/http/http_auth_handler_negotiate_unittest.cc +++ b/net/http/http_auth_handler_negotiate_unittest.cc @@ -29,7 +29,7 @@ namespace net { class HttpAuthHandlerNegotiateTest : public PlatformTest { public: - virtual void SetUp() { + void SetUp() override { auth_library_ = new MockAuthLibrary(); resolver_.reset(new MockHostResolver()); resolver_->rules()->AddIPLiteralRule("alias", "10.0.0.2", diff --git a/net/http/http_network_layer_unittest.cc b/net/http/http_network_layer_unittest.cc index 7225001..ca04829 100644 --- a/net/http/http_network_layer_unittest.cc +++ b/net/http/http_network_layer_unittest.cc @@ -28,7 +28,7 @@ class HttpNetworkLayerTest : public PlatformTest { protected: HttpNetworkLayerTest() : ssl_config_service_(new SSLConfigServiceDefaults) {} - virtual void SetUp() { + void SetUp() override { ConfigureTestDependencies(ProxyService::CreateDirect()); } diff --git a/net/http/http_network_transaction_ssl_unittest.cc b/net/http/http_network_transaction_ssl_unittest.cc index a84076e..ec52c35 100644 --- a/net/http/http_network_transaction_ssl_unittest.cc +++ b/net/http/http_network_transaction_ssl_unittest.cc @@ -58,7 +58,7 @@ class TLS11SSLConfigService : public SSLConfigService { class HttpNetworkTransactionSSLTest : public testing::Test { protected: - virtual void SetUp() { + void SetUp() override { ssl_config_service_ = new TLS10SSLConfigService; session_params_.ssl_config_service = ssl_config_service_.get(); diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc index e4a75b9..be94493 100644 --- a/net/http/http_network_transaction_unittest.cc +++ b/net/http/http_network_transaction_unittest.cc @@ -253,12 +253,12 @@ class HttpNetworkTransactionTest LoadTimingInfo load_timing_info; }; - virtual void SetUp() { + void SetUp() override { NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); base::MessageLoop::current()->RunUntilIdle(); } - virtual void TearDown() { + void TearDown() override { NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); base::MessageLoop::current()->RunUntilIdle(); // Empty the current queue. diff --git a/net/http/http_response_body_drainer_unittest.cc b/net/http/http_response_body_drainer_unittest.cc index cb2f1a9..371e9a7 100644 --- a/net/http/http_response_body_drainer_unittest.cc +++ b/net/http/http_response_body_drainer_unittest.cc @@ -213,7 +213,7 @@ class HttpResponseBodyDrainerTest : public testing::Test { mock_stream_(new MockHttpStream(&result_waiter_)), drainer_(new HttpResponseBodyDrainer(mock_stream_)) {} - virtual ~HttpResponseBodyDrainerTest() {} + ~HttpResponseBodyDrainerTest() override {} HttpNetworkSession* CreateNetworkSession() const { HttpNetworkSession::Params params; diff --git a/net/http/http_server_properties_manager_unittest.cc b/net/http/http_server_properties_manager_unittest.cc index fcc253e..db58c92 100644 --- a/net/http/http_server_properties_manager_unittest.cc +++ b/net/http/http_server_properties_manager_unittest.cc @@ -87,7 +87,7 @@ class HttpServerPropertiesManagerTest : public testing::Test { protected: HttpServerPropertiesManagerTest() {} - virtual void SetUp() override { + void SetUp() override { pref_service_.registry()->RegisterDictionaryPref(kTestHttpServerProperties); http_server_props_manager_.reset( new StrictMock<TestingHttpServerPropertiesManager>( @@ -98,7 +98,7 @@ class HttpServerPropertiesManagerTest : public testing::Test { base::RunLoop().RunUntilIdle(); } - virtual void TearDown() override { + void TearDown() override { if (http_server_props_manager_.get()) http_server_props_manager_->ShutdownOnPrefThread(); base::RunLoop().RunUntilIdle(); diff --git a/net/http/transport_security_persister_unittest.cc b/net/http/transport_security_persister_unittest.cc index b8dad5a..7bb2e99 100644 --- a/net/http/transport_security_persister_unittest.cc +++ b/net/http/transport_security_persister_unittest.cc @@ -23,11 +23,11 @@ class TransportSecurityPersisterTest : public testing::Test { TransportSecurityPersisterTest() { } - virtual ~TransportSecurityPersisterTest() { + ~TransportSecurityPersisterTest() override { base::MessageLoopForIO::current()->RunUntilIdle(); } - virtual void SetUp() override { + void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); persister_.reset(new TransportSecurityPersister( &state_, diff --git a/net/http/transport_security_state_unittest.cc b/net/http/transport_security_state_unittest.cc index 8a2ebe8..eb72050 100644 --- a/net/http/transport_security_state_unittest.cc +++ b/net/http/transport_security_state_unittest.cc @@ -39,7 +39,7 @@ namespace net { class TransportSecurityStateTest : public testing::Test { public: - virtual void SetUp() { + void SetUp() override { #if defined(USE_OPENSSL) crypto::EnsureOpenSSLInit(); #else |