Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: components/sync/driver/shared_change_processor_unittest.cc

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Rebase. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/driver/shared_change_processor_ref.cc ('k') | components/sync/driver/startup_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/shared_change_processor_unittest.cc
diff --git a/components/sync/driver/shared_change_processor_unittest.cc b/components/sync/driver/shared_change_processor_unittest.cc
index 2fa3d5ac6bf5dc01dac38696b426d692cda708e2..3cdf1ac171a63576ee79c6f2906f1d582cd46499 100644
--- a/components/sync/driver/shared_change_processor_unittest.cc
+++ b/components/sync/driver/shared_change_processor_unittest.cc
@@ -30,7 +30,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace sync_driver {
+namespace syncer {
namespace {
@@ -44,40 +44,39 @@ class TestSyncApiComponentFactory : public SyncApiComponentFactory {
// SyncApiComponentFactory implementation.
void RegisterDataTypes(
- sync_driver::SyncService* sync_service,
+ SyncService* sync_service,
const RegisterDataTypesMethod& register_platform_types_method) override {}
- sync_driver::DataTypeManager* CreateDataTypeManager(
- const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
- debug_info_listener,
- const sync_driver::DataTypeController::TypeMap* controllers,
- const sync_driver::DataTypeEncryptionHandler* encryption_handler,
- browser_sync::SyncBackendHost* backend,
- sync_driver::DataTypeManagerObserver* observer) override {
+ DataTypeManager* CreateDataTypeManager(
+ const WeakHandle<DataTypeDebugInfoListener>& debug_info_listener,
+ const DataTypeController::TypeMap* controllers,
+ const DataTypeEncryptionHandler* encryption_handler,
+ SyncBackendHost* backend,
+ DataTypeManagerObserver* observer) override {
return nullptr;
}
- browser_sync::SyncBackendHost* CreateSyncBackendHost(
+ SyncBackendHost* CreateSyncBackendHost(
const std::string& name,
invalidation::InvalidationService* invalidator,
- const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs,
+ const base::WeakPtr<SyncPrefs>& sync_prefs,
const base::FilePath& sync_folder) override {
return nullptr;
}
- std::unique_ptr<sync_driver::LocalDeviceInfoProvider>
- CreateLocalDeviceInfoProvider() override {
+ std::unique_ptr<LocalDeviceInfoProvider> CreateLocalDeviceInfoProvider()
+ override {
return nullptr;
}
SyncApiComponentFactory::SyncComponents CreateBookmarkSyncComponents(
- sync_driver::SyncService* sync_service,
- std::unique_ptr<syncer::DataTypeErrorHandler> error_handler) override {
+ SyncService* sync_service,
+ std::unique_ptr<DataTypeErrorHandler> error_handler) override {
return SyncApiComponentFactory::SyncComponents(nullptr, nullptr);
}
- std::unique_ptr<syncer::AttachmentService> CreateAttachmentService(
- std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store,
- const syncer::UserShare& user_share,
+ std::unique_ptr<AttachmentService> CreateAttachmentService(
+ std::unique_ptr<AttachmentStoreForSync> attachment_store,
+ const UserShare& user_share,
const std::string& store_birthday,
- syncer::ModelType model_type,
- syncer::AttachmentService::Delegate* delegate) override {
- return syncer::AttachmentServiceImpl::CreateForTest();
+ ModelType model_type,
+ AttachmentService::Delegate* delegate) override {
+ return AttachmentServiceImpl::CreateForTest();
}
};
@@ -95,15 +94,15 @@ class SyncSharedChangeProcessorTest : public testing::Test,
}
// FakeSyncClient override.
- base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
- syncer::ModelType type) override {
+ base::WeakPtr<SyncableService> GetSyncableServiceForType(
+ ModelType type) override {
return db_syncable_service_->AsWeakPtr();
}
protected:
void SetUp() override {
test_user_share_.SetUp();
- shared_change_processor_ = new SharedChangeProcessor(syncer::AUTOFILL);
+ shared_change_processor_ = new SharedChangeProcessor(AUTOFILL);
ASSERT_TRUE(backend_thread_.Start());
ASSERT_TRUE(backend_thread_.task_runner()->PostTask(
FROM_HERE,
@@ -165,7 +164,7 @@ class SyncSharedChangeProcessorTest : public testing::Test,
void SetUpDBSyncableService() {
DCHECK(backend_thread_.task_runner()->BelongsToCurrentThread());
DCHECK(!db_syncable_service_.get());
- db_syncable_service_.reset(new syncer::FakeSyncableService());
+ db_syncable_service_.reset(new FakeSyncableService());
}
// Used by TearDown().
@@ -179,7 +178,7 @@ class SyncSharedChangeProcessorTest : public testing::Test,
DCHECK(backend_thread_.task_runner()->BelongsToCurrentThread());
DCHECK(db_syncable_service_.get());
db_syncable_service_->set_attachment_store(
- syncer::AttachmentStore::CreateInMemoryStore());
+ AttachmentStore::CreateInMemoryStore());
}
// Used by Connect(). The SharedChangeProcessor is passed in
@@ -190,8 +189,8 @@ class SyncSharedChangeProcessorTest : public testing::Test,
DCHECK(backend_thread_.task_runner()->BelongsToCurrentThread());
EXPECT_TRUE(shared_change_processor->Connect(
this, &processor_factory_, test_user_share_.user_share(),
- base::MakeUnique<syncer::DataTypeErrorHandlerMock>(),
- base::WeakPtr<syncer::SyncMergeResult>()));
+ base::MakeUnique<DataTypeErrorHandlerMock>(),
+ base::WeakPtr<SyncMergeResult>()));
did_connect_ = true;
}
@@ -204,7 +203,7 @@ class SyncSharedChangeProcessorTest : public testing::Test,
base::MessageLoop frontend_loop_;
base::Thread backend_thread_;
- syncer::TestUserShare test_user_share_;
+ TestUserShare test_user_share_;
TestSyncApiComponentFactory factory_;
scoped_refptr<SharedChangeProcessor> shared_change_processor_;
@@ -214,7 +213,7 @@ class SyncSharedChangeProcessorTest : public testing::Test,
bool has_attachment_service_;
// Used only on DB thread.
- std::unique_ptr<syncer::FakeSyncableService> db_syncable_service_;
+ std::unique_ptr<FakeSyncableService> db_syncable_service_;
};
// Simply connect the shared change processor. It should succeed, and
@@ -234,4 +233,4 @@ TEST_F(SyncSharedChangeProcessorTest, ConnectWithAttachmentStore) {
} // namespace
-} // namespace sync_driver
+} // namespace syncer
« no previous file with comments | « components/sync/driver/shared_change_processor_ref.cc ('k') | components/sync/driver/startup_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698