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

Unified Diff: components/sync/core_impl/sync_manager_impl_unittest.cc

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 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
Index: components/sync/core_impl/sync_manager_impl_unittest.cc
diff --git a/components/sync/core_impl/sync_manager_impl_unittest.cc b/components/sync/core_impl/sync_manager_impl_unittest.cc
index dbe0fb29cb3dc517f3a48831c16f4f2501205467..5ff5a15fa9e4ccc39336916fc3d738076eb32599 100644
--- a/components/sync/core_impl/sync_manager_impl_unittest.cc
+++ b/components/sync/core_impl/sync_manager_impl_unittest.cc
@@ -289,29 +289,29 @@ void SyncApiTest::CreateEntryWithAttachmentMetadata(
const ModelType& model_type,
const std::string& client_tag,
const sync_pb::AttachmentMetadata& attachment_metadata) {
- WriteTransaction trans(FROM_HERE, user_share());
- ReadNode root_node(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, user_share());
+ syncer::ReadNode root_node(&trans);
root_node.InitByRootLookup();
- WriteNode node(&trans);
+ syncer::WriteNode node(&trans);
ASSERT_EQ(node.InitUniqueByCreation(model_type, root_node, client_tag),
- WriteNode::INIT_SUCCESS);
+ syncer::WriteNode::INIT_SUCCESS);
node.SetAttachmentMetadata(attachment_metadata);
}
BaseNode::InitByLookupResult SyncApiTest::LookupEntryByClientTag(
const ModelType& model_type,
const std::string& client_tag) {
- ReadTransaction trans(FROM_HERE, user_share());
- ReadNode node(&trans);
+ syncer::ReadTransaction trans(FROM_HERE, user_share());
+ syncer::ReadNode node(&trans);
return node.InitByClientTagLookup(model_type, client_tag);
}
void SyncApiTest::ReplaceWithTombstone(const ModelType& model_type,
const std::string& client_tag) {
- WriteTransaction trans(FROM_HERE, user_share());
- WriteNode node(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, user_share());
+ syncer::WriteNode node(&trans);
ASSERT_EQ(node.InitByClientTagLookup(model_type, client_tag),
- WriteNode::INIT_OK);
+ syncer::WriteNode::INIT_OK);
node.Tombstone();
}
@@ -702,7 +702,7 @@ TEST_F(SyncApiTest, GetTotalNodeCountMultipleChildren) {
TEST_F(SyncApiTest, AttachmentLinking) {
// Add an entry with an attachment.
std::string tag1("some tag");
- AttachmentId attachment_id(AttachmentId::Create(0, 0));
+ syncer::AttachmentId attachment_id(syncer::AttachmentId::Create(0, 0));
sync_pb::AttachmentMetadata attachment_metadata;
sync_pb::AttachmentMetadataRecord* record = attachment_metadata.add_record();
*record->mutable_id() = attachment_id.GetProto();
@@ -720,7 +720,7 @@ TEST_F(SyncApiTest, AttachmentLinking) {
ASSERT_TRUE(dir()->IsAttachmentLinked(attachment_id.GetProto()));
// Tombstone the first entry.
- ReplaceWithTombstone(PREFERENCES, tag1);
+ ReplaceWithTombstone(syncer::PREFERENCES, tag1);
// See that the attachment is still considered linked because the entry hasn't
// been purged from the Directory.
@@ -729,7 +729,7 @@ TEST_F(SyncApiTest, AttachmentLinking) {
// Save changes and see that the entry is truly gone.
ASSERT_TRUE(dir()->SaveChanges());
ASSERT_EQ(LookupEntryByClientTag(PREFERENCES, tag1),
- WriteNode::INIT_FAILED_ENTRY_NOT_GOOD);
+ syncer::WriteNode::INIT_FAILED_ENTRY_NOT_GOOD);
// However, the attachment is still linked.
ASSERT_TRUE(dir()->IsAttachmentLinked(attachment_id.GetProto()));
@@ -739,10 +739,10 @@ TEST_F(SyncApiTest, AttachmentLinking) {
ASSERT_TRUE(dir()->IsAttachmentLinked(attachment_id.GetProto()));
// Tombstone the second entry, save changes, see that it's truly gone.
- ReplaceWithTombstone(PREFERENCES, tag2);
+ ReplaceWithTombstone(syncer::PREFERENCES, tag2);
ASSERT_TRUE(dir()->SaveChanges());
ASSERT_EQ(LookupEntryByClientTag(PREFERENCES, tag2),
- WriteNode::INIT_FAILED_ENTRY_NOT_GOOD);
+ syncer::WriteNode::INIT_FAILED_ENTRY_NOT_GOOD);
// Finally, the attachment is no longer linked.
ASSERT_FALSE(dir()->IsAttachmentLinked(attachment_id.GetProto()));
@@ -911,11 +911,11 @@ class SyncManagerObserverMock : public SyncManager::Observer {
void(const WeakHandle<JsBackend>&,
const WeakHandle<DataTypeDebugInfoListener>&,
bool,
- ModelTypeSet)); // NOLINT
+ syncer::ModelTypeSet)); // NOLINT
MOCK_METHOD1(OnConnectionStatusChange, void(ConnectionStatus)); // NOLINT
MOCK_METHOD1(OnUpdatedToken, void(const std::string&)); // NOLINT
MOCK_METHOD1(OnActionableError, void(const SyncProtocolError&)); // NOLINT
- MOCK_METHOD1(OnMigrationRequested, void(ModelTypeSet)); // NOLINT
+ MOCK_METHOD1(OnMigrationRequested, void(syncer::ModelTypeSet)); // NOLINT
MOCK_METHOD1(OnProtocolEvent, void(const ProtocolEvent&)); // NOLINT
};
« no previous file with comments | « components/sync/core_impl/sync_manager_impl.cc ('k') | components/sync/core_impl/test/fake_model_type_connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698