summaryrefslogtreecommitdiffstats
path: root/sync
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-12-22 14:40:24 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-22 22:41:02 +0000
commit520ae85e967f776f4134277cb14e487894421226 (patch)
tree509299de71fd5d8cba15fe5758a495fd86898524 /sync
parentdf1702e8aa43e3996d64c0988e48612a5fad4624 (diff)
downloadchromium_src-520ae85e967f776f4134277cb14e487894421226.zip
chromium_src-520ae85e967f776f4134277cb14e487894421226.tar.gz
chromium_src-520ae85e967f776f4134277cb14e487894421226.tar.bz2
Standardize usage of virtual/override/final specifiers in sync/.
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. Several formatting edits by clang-format were manually reverted, due to mangling of some of the more complicate IPC macros. BUG=417463 Review URL: https://codereview.chromium.org/792343004 Cr-Commit-Position: refs/heads/master@{#309474}
Diffstat (limited to 'sync')
-rw-r--r--sync/api/syncable_service.h5
-rw-r--r--sync/engine/apply_control_data_updates_unittest.cc8
-rw-r--r--sync/engine/directory_commit_contribution_unittest.cc6
-rw-r--r--sync/engine/directory_update_handler_unittest.cc16
-rw-r--r--sync/engine/entity_tracker_unittest.cc2
-rw-r--r--sync/engine/get_updates_processor_unittest.cc8
-rw-r--r--sync/engine/model_type_sync_proxy_impl_unittest.cc2
-rw-r--r--sync/engine/model_type_sync_worker_impl_unittest.cc2
-rw-r--r--sync/engine/sync_scheduler_unittest.cc8
-rw-r--r--sync/engine/syncer_proto_util_unittest.cc8
-rw-r--r--sync/engine/syncer_unittest.cc4
-rw-r--r--sync/engine/syncer_util_unittest.cc6
-rw-r--r--sync/internal_api/attachments/attachment_downloader_impl_unittest.cc4
-rw-r--r--sync/internal_api/attachments/attachment_service_impl_unittest.cc4
-rw-r--r--sync/internal_api/attachments/attachment_service_proxy_unittest.cc5
-rw-r--r--sync/internal_api/attachments/attachment_store_handle_unittest.cc2
-rw-r--r--sync/internal_api/attachments/attachment_uploader_impl_unittest.cc4
-rw-r--r--sync/internal_api/attachments/fake_attachment_downloader_unittest.cc4
-rw-r--r--sync/internal_api/attachments/fake_attachment_uploader_unittest.cc2
-rw-r--r--sync/internal_api/http_bridge_unittest.cc4
-rw-r--r--sync/internal_api/protocol_event_buffer_unittest.cc2
-rw-r--r--sync/internal_api/public/base/cancelation_signal_unittest.cc2
-rw-r--r--sync/internal_api/public/util/weak_handle_unittest.cc2
-rw-r--r--sync/internal_api/sync_context_proxy_impl_unittest.cc4
-rw-r--r--sync/internal_api/sync_manager_impl_unittest.cc8
-rw-r--r--sync/internal_api/sync_rollback_manager_base_unittest.cc2
-rw-r--r--sync/sessions/model_type_registry_unittest.cc4
-rw-r--r--sync/syncable/deferred_on_disk_directory_backing_store_unittest.cc6
-rw-r--r--sync/syncable/directory_backing_store_unittest.cc4
-rw-r--r--sync/syncable/directory_unittest.h6
-rw-r--r--sync/syncable/parent_child_index_unittest.cc2
-rw-r--r--sync/syncable/syncable_unittest.cc12
32 files changed, 65 insertions, 93 deletions
diff --git a/sync/api/syncable_service.h b/sync/api/syncable_service.h
index 960abc5..f83a017 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 7248d14..7ed6bd4 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 be04c73..b5612b6 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 e7518ff..8b6e6ff 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 7a1b04b..873875b 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 c146c56..566a295 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 860cc70..1b30219 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 5c62c9a..934f3fa 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 3c86748..21d7f28 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<MockSyncer>();
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 81b2566..a5c1fd4 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 f8682a6..965728b 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 9fda35f..7580755 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 96ea5ea..1d026eb 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 713d155..e72bb8f 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 3d5cd55..d1b9356 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 9f82a78..2224e54 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<AttachmentStoreBase> 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 2daff32..4af6cd8 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 7ab6235..1436a49 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 2cfd75e..45b4d30 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 9015cbf..2625546 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 d6d4034..b197ec0 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<ProtocolEvent> 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 58a35cc..244c925 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 7200329..4be4fb7 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<Derived> {};
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 49ed02d..1ab1298 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 0f58bb9..ac5b31a 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 2f682ad..fd1c12f 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 f9a041f..47be479 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 b58ccb7..fbba75e 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 9b92e56..8f679f1 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<int> {
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 81e3888..e5427a8 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 5ae9d27..c0c9e82 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 5706106..d1c6ae8 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_;