diff --git a/sync/api/syncable_service.h b/sync/api/syncable_service.h index 960abc5781fa77..f83a017c2da14f 100644 --- a/sync/api/syncable_service.h +++ b/sync/api/syncable_service.h @@ -63,9 +63,8 @@ class SYNC_EXPORT SyncableService // Returns: A default SyncError (IsSet() == false) if no errors were // encountered, and a filled SyncError (IsSet() == true) // otherwise. - virtual SyncError ProcessSyncChanges( - const tracked_objects::Location& from_here, - const SyncChangeList& change_list) override = 0; + SyncError ProcessSyncChanges(const tracked_objects::Location& from_here, + const SyncChangeList& change_list) override = 0; // Returns AttachmentStore used by datatype. Attachment store is used by sync // when uploading or downloading attachments. diff --git a/sync/engine/apply_control_data_updates_unittest.cc b/sync/engine/apply_control_data_updates_unittest.cc index 7248d141815c36..7ed6bd4899f060 100644 --- a/sync/engine/apply_control_data_updates_unittest.cc +++ b/sync/engine/apply_control_data_updates_unittest.cc @@ -35,16 +35,14 @@ class ApplyControlDataUpdatesTest : public ::testing::Test { public: protected: ApplyControlDataUpdatesTest() {} - virtual ~ApplyControlDataUpdatesTest() {} + ~ApplyControlDataUpdatesTest() override {} - virtual void SetUp() { + void SetUp() override { dir_maker_.SetUp(); entry_factory_.reset(new TestEntryFactory(directory())); } - virtual void TearDown() { - dir_maker_.TearDown(); - } + void TearDown() override { dir_maker_.TearDown(); } syncable::Directory* directory() { return dir_maker_.directory(); diff --git a/sync/engine/directory_commit_contribution_unittest.cc b/sync/engine/directory_commit_contribution_unittest.cc index be04c73c420688..b5612b6d66c9c1 100644 --- a/sync/engine/directory_commit_contribution_unittest.cc +++ b/sync/engine/directory_commit_contribution_unittest.cc @@ -20,7 +20,7 @@ namespace syncer { class DirectoryCommitContributionTest : public ::testing::Test { public: - virtual void SetUp() override { + void SetUp() override { dir_maker_.SetUp(); syncable::WriteTransaction trans(FROM_HERE, syncable::UNITTEST, dir()); @@ -30,9 +30,7 @@ class DirectoryCommitContributionTest : public ::testing::Test { CreateTypeRoot(&trans, dir(), BOOKMARKS); } - virtual void TearDown() override { - dir_maker_.TearDown(); - } + void TearDown() override { dir_maker_.TearDown(); } protected: int64 CreateUnsyncedItemWithAttachments( diff --git a/sync/engine/directory_update_handler_unittest.cc b/sync/engine/directory_update_handler_unittest.cc index e7518ff6b9ff13..8b6e6ffe88572d 100644 --- a/sync/engine/directory_update_handler_unittest.cc +++ b/sync/engine/directory_update_handler_unittest.cc @@ -44,15 +44,11 @@ class DirectoryUpdateHandlerProcessUpdateTest : public ::testing::Test { : ui_worker_(new FakeModelWorker(GROUP_UI)) { } - virtual ~DirectoryUpdateHandlerProcessUpdateTest() {} + ~DirectoryUpdateHandlerProcessUpdateTest() override {} - virtual void SetUp() override { - dir_maker_.SetUp(); - } + void SetUp() override { dir_maker_.SetUp(); } - virtual void TearDown() override { - dir_maker_.TearDown(); - } + void TearDown() override { dir_maker_.TearDown(); } syncable::Directory* dir() { return dir_maker_.directory(); @@ -486,7 +482,7 @@ class DirectoryUpdateHandlerApplyUpdateTest : public ::testing::Test { articles_emitter_(ARTICLES, &type_observers_), update_handler_map_deleter_(&update_handler_map_) {} - virtual void SetUp() override { + void SetUp() override { dir_maker_.SetUp(); entry_factory_.reset(new TestEntryFactory(directory())); @@ -506,9 +502,7 @@ class DirectoryUpdateHandlerApplyUpdateTest : public ::testing::Test { directory(), ARTICLES, ui_worker_, &articles_emitter_))); } - virtual void TearDown() override { - dir_maker_.TearDown(); - } + void TearDown() override { dir_maker_.TearDown(); } const UpdateCounters& GetBookmarksUpdateCounters() { return bookmarks_emitter_.GetUpdateCounters(); diff --git a/sync/engine/entity_tracker_unittest.cc b/sync/engine/entity_tracker_unittest.cc index 7a1b04b56a333e..873875b64b181f 100644 --- a/sync/engine/entity_tracker_unittest.cc +++ b/sync/engine/entity_tracker_unittest.cc @@ -34,7 +34,7 @@ class EntityTrackerTest : public ::testing::Test { specifics.mutable_preference()->set_value("pref.value"); } - virtual ~EntityTrackerTest() {} + ~EntityTrackerTest() override {} const std::string kServerId; const std::string kClientTag; diff --git a/sync/engine/get_updates_processor_unittest.cc b/sync/engine/get_updates_processor_unittest.cc index c146c56baf83a5..566a295c92d39d 100644 --- a/sync/engine/get_updates_processor_unittest.cc +++ b/sync/engine/get_updates_processor_unittest.cc @@ -40,7 +40,7 @@ class GetUpdatesProcessorTest : public ::testing::Test { kTestStartTime(base::TimeTicks::Now()), update_handler_deleter_(&update_handler_map_) {} - virtual void SetUp() { + void SetUp() override { AddUpdateHandler(AUTOFILL); AddUpdateHandler(BOOKMARKS); AddUpdateHandler(PREFERENCES); @@ -386,9 +386,9 @@ TEST_F(GetUpdatesProcessorTest, NormalResponseTest) { class GetUpdatesProcessorApplyUpdatesTest : public GetUpdatesProcessorTest { public: GetUpdatesProcessorApplyUpdatesTest() {} - virtual ~GetUpdatesProcessorApplyUpdatesTest() {} + ~GetUpdatesProcessorApplyUpdatesTest() override {} - virtual void SetUp() override { + void SetUp() override { bookmarks_handler_ = AddUpdateHandler(BOOKMARKS); autofill_handler_ = AddUpdateHandler(AUTOFILL); } @@ -475,7 +475,7 @@ TEST_F(GetUpdatesProcessorApplyUpdatesTest, Poll) { class DownloadUpdatesDebugInfoTest : public ::testing::Test { public: DownloadUpdatesDebugInfoTest() {} - virtual ~DownloadUpdatesDebugInfoTest() {} + ~DownloadUpdatesDebugInfoTest() override {} sessions::StatusController* status() { return &status_; diff --git a/sync/engine/model_type_sync_proxy_impl_unittest.cc b/sync/engine/model_type_sync_proxy_impl_unittest.cc index 860cc703cce50b..1b30219a8a0485 100644 --- a/sync/engine/model_type_sync_proxy_impl_unittest.cc +++ b/sync/engine/model_type_sync_proxy_impl_unittest.cc @@ -42,7 +42,7 @@ static const ModelType kModelType = PREFERENCES; class ModelTypeSyncProxyImplTest : public ::testing::Test { public: ModelTypeSyncProxyImplTest(); - virtual ~ModelTypeSyncProxyImplTest(); + ~ModelTypeSyncProxyImplTest() override; // Initialize with no local state. The type sync proxy will be unable to // commit until it receives notification that initial sync has completed. diff --git a/sync/engine/model_type_sync_worker_impl_unittest.cc b/sync/engine/model_type_sync_worker_impl_unittest.cc index 5c62c9a068a411..934f3fa01cfc43 100644 --- a/sync/engine/model_type_sync_worker_impl_unittest.cc +++ b/sync/engine/model_type_sync_worker_impl_unittest.cc @@ -57,7 +57,7 @@ namespace syncer { class ModelTypeSyncWorkerImplTest : public ::testing::Test { public: ModelTypeSyncWorkerImplTest(); - virtual ~ModelTypeSyncWorkerImplTest(); + ~ModelTypeSyncWorkerImplTest() override; // One of these Initialize functions should be called at the beginning of // each test. diff --git a/sync/engine/sync_scheduler_unittest.cc b/sync/engine/sync_scheduler_unittest.cc index 3c86748264454b..21d7f28513c756 100644 --- a/sync/engine/sync_scheduler_unittest.cc +++ b/sync/engine/sync_scheduler_unittest.cc @@ -120,7 +120,7 @@ class SyncSchedulerTest : public testing::Test { MOCK_METHOD1(GetDelay, TimeDelta(const TimeDelta&)); }; - virtual void SetUp() { + void SetUp() override { dir_maker_.SetUp(); syncer_ = new testing::StrictMock(); delay_ = NULL; @@ -172,7 +172,7 @@ class SyncSchedulerTest : public testing::Test { return TestTimeouts::action_timeout(); } - virtual void TearDown() { + void TearDown() override { PumpLoop(); scheduler_.reset(); PumpLoop(); @@ -895,14 +895,14 @@ TEST_F(SyncSchedulerTest, ConfigurationMode) { } class BackoffTriggersSyncSchedulerTest : public SyncSchedulerTest { - virtual void SetUp() { + void SetUp() override { SyncSchedulerTest::SetUp(); UseMockDelayProvider(); EXPECT_CALL(*delay(), GetDelay(_)) .WillRepeatedly(Return(TimeDelta::FromMilliseconds(10))); } - virtual void TearDown() { + void TearDown() override { StopSyncScheduler(); SyncSchedulerTest::TearDown(); } diff --git a/sync/engine/syncer_proto_util_unittest.cc b/sync/engine/syncer_proto_util_unittest.cc index 81b25662894bdb..a5c1fd45b42351 100644 --- a/sync/engine/syncer_proto_util_unittest.cc +++ b/sync/engine/syncer_proto_util_unittest.cc @@ -184,13 +184,9 @@ TEST(SyncerProtoUtil, NameExtractionTwoNames) { class SyncerProtoUtilTest : public testing::Test { public: - virtual void SetUp() { - dir_maker_.SetUp(); - } + void SetUp() override { dir_maker_.SetUp(); } - virtual void TearDown() { - dir_maker_.TearDown(); - } + void TearDown() override { dir_maker_.TearDown(); } syncable::Directory* directory() { return dir_maker_.directory(); diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc index f8682a67cd2d74..965728b312cf2b 100644 --- a/sync/engine/syncer_unittest.cc +++ b/sync/engine/syncer_unittest.cc @@ -277,7 +277,7 @@ class SyncerTest : public testing::Test, session_.get())); } - virtual void SetUp() { + void SetUp() override { dir_maker_.SetUp(); mock_server_.reset(new MockConnectionManager(directory(), &cancelation_signal_)); @@ -324,7 +324,7 @@ class SyncerTest : public testing::Test, mock_server_->SetKeystoreKey("encryption_key"); } - virtual void TearDown() { + void TearDown() override { model_type_registry_->UnregisterDirectoryTypeDebugInfoObserver( &debug_info_cache_); mock_server_.reset(); diff --git a/sync/engine/syncer_util_unittest.cc b/sync/engine/syncer_util_unittest.cc index 9fda35f6bf76b1..7580755511f664 100644 --- a/sync/engine/syncer_util_unittest.cc +++ b/sync/engine/syncer_util_unittest.cc @@ -17,14 +17,12 @@ namespace syncer { class GetUpdatePositionTest : public ::testing::Test { public: - virtual void SetUp() { + void SetUp() override { dir_maker_.SetUp(); entry_factory_.reset(new TestEntryFactory(directory())); } - virtual void TearDown() { - dir_maker_.TearDown(); - } + void TearDown() override { dir_maker_.TearDown(); } syncable::Directory* directory() { return dir_maker_.directory(); diff --git a/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc b/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc index 96ea5eaef506b2..1d026eb56a5f6d 100644 --- a/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc +++ b/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc @@ -154,8 +154,8 @@ class AttachmentDownloaderImplTest : public testing::Test { AttachmentDownloaderImplTest() : num_completed_downloads_(0) {} - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; AttachmentDownloader* downloader() { return attachment_downloader_.get(); } diff --git a/sync/internal_api/attachments/attachment_service_impl_unittest.cc b/sync/internal_api/attachments/attachment_service_impl_unittest.cc index 713d1550602747..e72bb8fe578f46 100644 --- a/sync/internal_api/attachments/attachment_service_impl_unittest.cc +++ b/sync/internal_api/attachments/attachment_service_impl_unittest.cc @@ -176,14 +176,14 @@ class AttachmentServiceImplTest : public testing::Test, protected: AttachmentServiceImplTest() {} - virtual void SetUp() override { + void SetUp() override { network_change_notifier_.reset(net::NetworkChangeNotifier::CreateMock()); InitializeAttachmentService(make_scoped_ptr(new MockAttachmentUploader()), make_scoped_ptr(new MockAttachmentDownloader()), this); } - virtual void TearDown() override { + void TearDown() override { attachment_service_.reset(); ASSERT_FALSE(attachment_store_); ASSERT_FALSE(attachment_uploader_); diff --git a/sync/internal_api/attachments/attachment_service_proxy_unittest.cc b/sync/internal_api/attachments/attachment_service_proxy_unittest.cc index 3d5cd552888829..d1b935637c78ae 100644 --- a/sync/internal_api/attachments/attachment_service_proxy_unittest.cc +++ b/sync/internal_api/attachments/attachment_service_proxy_unittest.cc @@ -91,7 +91,7 @@ class AttachmentServiceProxyTest : public testing::Test, protected: AttachmentServiceProxyTest() {} - virtual void SetUp() { + void SetUp() override { CalledOnValidThread(); stub_thread.reset(new base::Thread("attachment service stub thread")); stub_thread->Start(); @@ -108,8 +108,7 @@ class AttachmentServiceProxyTest : public testing::Test, count_callback_drop = 0; } - virtual void TearDown() - override { + void TearDown() override { // We must take care to call the stub's destructor on the stub_thread // because that's the thread to which its WeakPtrs are bound. if (stub) { diff --git a/sync/internal_api/attachments/attachment_store_handle_unittest.cc b/sync/internal_api/attachments/attachment_store_handle_unittest.cc index 9f82a782d42a90..2224e54e1c04aa 100644 --- a/sync/internal_api/attachments/attachment_store_handle_unittest.cc +++ b/sync/internal_api/attachments/attachment_store_handle_unittest.cc @@ -88,7 +88,7 @@ class AttachmentStoreHandleTest : public testing::Test { read_all_metadata_call_count_(0), dtor_call_count_(0) {} - virtual void SetUp() { + void SetUp() override { scoped_ptr backend(new MockAttachmentStore( base::Bind(&AttachmentStoreHandleTest::InitCalled, base::Unretained(this)), diff --git a/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc b/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc index 2daff32b4a188d..4af6cd88408e67 100644 --- a/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc +++ b/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc @@ -194,8 +194,8 @@ class AttachmentUploaderImplTest : public testing::Test, protected: AttachmentUploaderImplTest(); - virtual void SetUp(); - virtual void TearDown(); + void SetUp() override; + void TearDown() override; // Run the message loop until UploadDone has been invoked |num_uploads| times. void RunAndWaitFor(int num_uploads); diff --git a/sync/internal_api/attachments/fake_attachment_downloader_unittest.cc b/sync/internal_api/attachments/fake_attachment_downloader_unittest.cc index 7ab6235c3b463c..1436a497eb12bd 100644 --- a/sync/internal_api/attachments/fake_attachment_downloader_unittest.cc +++ b/sync/internal_api/attachments/fake_attachment_downloader_unittest.cc @@ -16,9 +16,9 @@ class FakeAttachmentDownloaderTest : public testing::Test { protected: FakeAttachmentDownloaderTest() {} - virtual void SetUp() override {} + void SetUp() override {} - virtual void TearDown() override {} + void TearDown() override {} AttachmentDownloader* downloader() { return &attachment_downloader_; diff --git a/sync/internal_api/attachments/fake_attachment_uploader_unittest.cc b/sync/internal_api/attachments/fake_attachment_uploader_unittest.cc index 2cfd75ece89d2a..45b4d303822d0c 100644 --- a/sync/internal_api/attachments/fake_attachment_uploader_unittest.cc +++ b/sync/internal_api/attachments/fake_attachment_uploader_unittest.cc @@ -21,7 +21,7 @@ const char kAttachmentData[] = "some data"; class FakeAttachmentUploaderTest : public testing::Test { protected: - virtual void SetUp() { + void SetUp() override { upload_callback_count = 0; upload_callback = base::Bind(&FakeAttachmentUploaderTest::Increment, base::Unretained(this), diff --git a/sync/internal_api/http_bridge_unittest.cc b/sync/internal_api/http_bridge_unittest.cc index 9015cbf5806dff..26255464165fd3 100644 --- a/sync/internal_api/http_bridge_unittest.cc +++ b/sync/internal_api/http_bridge_unittest.cc @@ -31,13 +31,13 @@ class SyncHttpBridgeTest : public testing::Test { io_thread_("IO thread") { } - virtual void SetUp() { + void SetUp() override { base::Thread::Options options; options.message_loop_type = base::MessageLoop::TYPE_IO; io_thread_.StartWithOptions(options); } - virtual void TearDown() { + void TearDown() override { if (fake_default_request_context_getter_) { GetIOThreadLoop()->ReleaseSoon(FROM_HERE, fake_default_request_context_getter_); diff --git a/sync/internal_api/protocol_event_buffer_unittest.cc b/sync/internal_api/protocol_event_buffer_unittest.cc index d6d403401283ee..b197ec0bb160d1 100644 --- a/sync/internal_api/protocol_event_buffer_unittest.cc +++ b/sync/internal_api/protocol_event_buffer_unittest.cc @@ -16,7 +16,7 @@ namespace syncer { class ProtocolEventBufferTest : public ::testing::Test { public: ProtocolEventBufferTest(); - virtual ~ProtocolEventBufferTest(); + ~ProtocolEventBufferTest() override; static scoped_ptr MakeTestEvent(int64 id); static bool HasId(const ProtocolEvent& event, int64 id); diff --git a/sync/internal_api/public/base/cancelation_signal_unittest.cc b/sync/internal_api/public/base/cancelation_signal_unittest.cc index 58a35cc2eaa82b..244c9258331c0a 100644 --- a/sync/internal_api/public/base/cancelation_signal_unittest.cc +++ b/sync/internal_api/public/base/cancelation_signal_unittest.cc @@ -93,7 +93,7 @@ bool BlockingTask::WasStarted() { class CancelationSignalTest : public ::testing::Test { public: CancelationSignalTest(); - virtual ~CancelationSignalTest(); + ~CancelationSignalTest() override; // Starts the blocking task on a background thread. Does not wait for the // task to start. diff --git a/sync/internal_api/public/util/weak_handle_unittest.cc b/sync/internal_api/public/util/weak_handle_unittest.cc index 72003291e1951e..4be4fb792d1840 100644 --- a/sync/internal_api/public/util/weak_handle_unittest.cc +++ b/sync/internal_api/public/util/weak_handle_unittest.cc @@ -47,7 +47,7 @@ class Derived : public Base, public base::SupportsWeakPtr {}; class WeakHandleTest : public ::testing::Test { protected: - virtual void TearDown() { + void TearDown() override { // Process any last-minute posted tasks. PumpLoop(); } diff --git a/sync/internal_api/sync_context_proxy_impl_unittest.cc b/sync/internal_api/sync_context_proxy_impl_unittest.cc index 49ed02de0727c2..1ab12987c266a4 100644 --- a/sync/internal_api/sync_context_proxy_impl_unittest.cc +++ b/sync/internal_api/sync_context_proxy_impl_unittest.cc @@ -23,7 +23,7 @@ class SyncContextProxyImplTest : public ::testing::Test { : sync_task_runner_(base::ThreadTaskRunnerHandle::Get()), type_task_runner_(base::ThreadTaskRunnerHandle::Get()) {} - virtual void SetUp() { + void SetUp() override { dir_maker_.SetUp(); registry_.reset(new ModelTypeRegistry( workers_, dir_maker_.directory(), &nudge_handler_)); @@ -31,7 +31,7 @@ class SyncContextProxyImplTest : public ::testing::Test { new SyncContextProxyImpl(sync_task_runner_, registry_->AsWeakPtr())); } - virtual void TearDown() { + void TearDown() override { context_proxy_.reset(); registry_.reset(); dir_maker_.TearDown(); diff --git a/sync/internal_api/sync_manager_impl_unittest.cc b/sync/internal_api/sync_manager_impl_unittest.cc index 0f58bb93ecea86..ac5b31aeb36693 100644 --- a/sync/internal_api/sync_manager_impl_unittest.cc +++ b/sync/internal_api/sync_manager_impl_unittest.cc @@ -199,13 +199,9 @@ int64 MakeServerNode(UserShare* share, ModelType model_type, class SyncApiTest : public testing::Test { public: - virtual void SetUp() { - test_user_share_.SetUp(); - } + void SetUp() override { test_user_share_.SetUp(); } - virtual void TearDown() { - test_user_share_.TearDown(); - } + void TearDown() override { test_user_share_.TearDown(); } protected: // Create an entry with the given |model_type|, |client_tag| and diff --git a/sync/internal_api/sync_rollback_manager_base_unittest.cc b/sync/internal_api/sync_rollback_manager_base_unittest.cc index 2f682add6c31f8..fd1c12f849d33d 100644 --- a/sync/internal_api/sync_rollback_manager_base_unittest.cc +++ b/sync/internal_api/sync_rollback_manager_base_unittest.cc @@ -33,7 +33,7 @@ class SyncTestRollbackManager : public SyncRollbackManagerBase { class SyncRollbackManagerBaseTest : public testing::Test { protected: - virtual void SetUp() override { + void SetUp() override { SyncManager::InitArgs args; args.database_location = base::FilePath(base::FilePath::kCurrentDirectory); args.service_url = GURL("https://example.com/"); diff --git a/sync/sessions/model_type_registry_unittest.cc b/sync/sessions/model_type_registry_unittest.cc index f9a041f5b8ebad..47be4792005ff6 100644 --- a/sync/sessions/model_type_registry_unittest.cc +++ b/sync/sessions/model_type_registry_unittest.cc @@ -20,8 +20,8 @@ namespace syncer { class ModelTypeRegistryTest : public ::testing::Test { public: ModelTypeRegistryTest(); - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; ModelTypeRegistry* registry(); diff --git a/sync/syncable/deferred_on_disk_directory_backing_store_unittest.cc b/sync/syncable/deferred_on_disk_directory_backing_store_unittest.cc index b58ccb7624bd2c..fbba75e537ce07 100644 --- a/sync/syncable/deferred_on_disk_directory_backing_store_unittest.cc +++ b/sync/syncable/deferred_on_disk_directory_backing_store_unittest.cc @@ -20,14 +20,12 @@ static const base::FilePath::CharType kSyncDataFolderName[] = class DeferredOnDiskDirectoryBackingStoreTest : public testing::Test { protected: - virtual void SetUp() override { + void SetUp() override { CHECK(temp_dir_.CreateUniqueTempDir()); db_path_ = temp_dir_.path().Append(kSyncDataFolderName); } - virtual void TearDown() override { - STLDeleteValues(&handles_map_); - } + void TearDown() override { STLDeleteValues(&handles_map_); } base::ScopedTempDir temp_dir_; base::FilePath db_path_; diff --git a/sync/syncable/directory_backing_store_unittest.cc b/sync/syncable/directory_backing_store_unittest.cc index 9b92e56719404e..8f679f170d17f3 100644 --- a/sync/syncable/directory_backing_store_unittest.cc +++ b/sync/syncable/directory_backing_store_unittest.cc @@ -32,9 +32,7 @@ SYNC_EXPORT_PRIVATE extern const int32 kCurrentDBVersion; class MigrationTest : public testing::TestWithParam { public: - virtual void SetUp() { - ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); - } + void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } protected: std::string GetUsername() { diff --git a/sync/syncable/directory_unittest.h b/sync/syncable/directory_unittest.h index 81e388823a4517..e5427a8d76bea7 100644 --- a/sync/syncable/directory_unittest.h +++ b/sync/syncable/directory_unittest.h @@ -35,10 +35,10 @@ class SyncableDirectoryTest : public testing::Test { static const char kDirectoryName[]; SyncableDirectoryTest(); - virtual ~SyncableDirectoryTest(); + ~SyncableDirectoryTest() override; - virtual void SetUp(); - virtual void TearDown(); + void SetUp() override; + void TearDown() override; // Destroys any currently opened directory, creates and opens a new one. // diff --git a/sync/syncable/parent_child_index_unittest.cc b/sync/syncable/parent_child_index_unittest.cc index 5ae9d27bd87faa..c0c9e82406cc46 100644 --- a/sync/syncable/parent_child_index_unittest.cc +++ b/sync/syncable/parent_child_index_unittest.cc @@ -21,7 +21,7 @@ static const std::string kCacheGuid = "8HhNIHlEOCGQbIAALr9QEg=="; class ParentChildIndexTest : public testing::Test { public: - virtual void TearDown() { + void TearDown() override { // To make memory management easier, we take ownership of all EntryKernels // returned by our factory methods and delete them here. STLDeleteElements(&owned_entry_kernels_); diff --git a/sync/syncable/syncable_unittest.cc b/sync/syncable/syncable_unittest.cc index 5706106034a907..d1c6ae86d187bc 100644 --- a/sync/syncable/syncable_unittest.cc +++ b/sync/syncable/syncable_unittest.cc @@ -146,7 +146,7 @@ class OnDiskSyncableDirectoryTest : public SyncableDirectoryTest { protected: // SetUp() is called before each test case is run. // The sqlite3 DB is deleted before each test is run. - virtual void SetUp() { + void SetUp() override { SyncableDirectoryTest::SetUp(); ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); file_path_ = temp_dir_.path().Append( @@ -155,7 +155,7 @@ class OnDiskSyncableDirectoryTest : public SyncableDirectoryTest { CreateDirectory(); } - virtual void TearDown() { + void TearDown() override { // This also closes file handles. dir()->SaveChanges(); dir().reset(); @@ -545,12 +545,10 @@ TEST_F(OnDiskSyncableDirectoryTest, TestSaveChangesFailureWithPurge) { class SyncableDirectoryManagement : public testing::Test { public: - virtual void SetUp() { - ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); - } + void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } + + void TearDown() override {} - virtual void TearDown() { - } protected: base::MessageLoop message_loop_; base::ScopedTempDir temp_dir_;