| Index: components/sync/engine_impl/directory_commit_contribution_unittest.cc
|
| diff --git a/sync/engine/directory_commit_contribution_unittest.cc b/components/sync/engine_impl/directory_commit_contribution_unittest.cc
|
| similarity index 92%
|
| rename from sync/engine/directory_commit_contribution_unittest.cc
|
| rename to components/sync/engine_impl/directory_commit_contribution_unittest.cc
|
| index 41e5cf4d79dfa0da2a6923b3955ae5f4b484ce76..4b57b784d6e91bc2a575b2e4f0db6082ced5a2f3 100644
|
| --- a/sync/engine/directory_commit_contribution_unittest.cc
|
| +++ b/components/sync/engine_impl/directory_commit_contribution_unittest.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "sync/engine/directory_commit_contribution.h"
|
| +#include "components/sync/engine_impl/directory_commit_contribution.h"
|
|
|
| #include <stdint.h>
|
|
|
| @@ -10,15 +10,15 @@
|
| #include <string>
|
|
|
| #include "base/message_loop/message_loop.h"
|
| -#include "sync/internal_api/public/base/attachment_id_proto.h"
|
| -#include "sync/sessions/status_controller.h"
|
| -#include "sync/syncable/entry.h"
|
| -#include "sync/syncable/mutable_entry.h"
|
| -#include "sync/syncable/syncable_read_transaction.h"
|
| -#include "sync/syncable/syncable_write_transaction.h"
|
| -#include "sync/test/engine/test_directory_setter_upper.h"
|
| -#include "sync/test/engine/test_id_factory.h"
|
| -#include "sync/test/engine/test_syncable_utils.h"
|
| +#include "components/sync/base/attachment_id_proto.h"
|
| +#include "components/sync/sessions_impl/status_controller.h"
|
| +#include "components/sync/syncable/entry.h"
|
| +#include "components/sync/syncable/mutable_entry.h"
|
| +#include "components/sync/syncable/syncable_read_transaction.h"
|
| +#include "components/sync/syncable/syncable_write_transaction.h"
|
| +#include "components/sync/test/engine/test_directory_setter_upper.h"
|
| +#include "components/sync/test/engine/test_id_factory.h"
|
| +#include "components/sync/test/engine/test_syncable_utils.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace syncer {
|
| @@ -62,20 +62,16 @@ class DirectoryCommitContributionTest : public ::testing::Test {
|
| int64_t CreateUnsyncedItem(syncable::WriteTransaction* trans,
|
| ModelType type,
|
| const std::string& tag) {
|
| - return CreateUnsyncedItemWithAttachments(
|
| - trans, type, tag, sync_pb::AttachmentMetadata());
|
| + return CreateUnsyncedItemWithAttachments(trans, type, tag,
|
| + sync_pb::AttachmentMetadata());
|
| }
|
|
|
| int64_t CreateSyncedItem(syncable::WriteTransaction* trans,
|
| ModelType type,
|
| const std::string& tag) {
|
| syncable::Entry parent_entry(trans, syncable::GET_TYPE_ROOT, type);
|
| - syncable::MutableEntry entry(
|
| - trans,
|
| - syncable::CREATE,
|
| - type,
|
| - parent_entry.GetId(),
|
| - tag);
|
| + syncable::MutableEntry entry(trans, syncable::CREATE, type,
|
| + parent_entry.GetId(), tag);
|
|
|
| entry.PutId(syncable::Id::CreateFromServerId(
|
| id_factory_.NewServerId().GetServerId()));
|
| @@ -103,9 +99,7 @@ class DirectoryCommitContributionTest : public ::testing::Test {
|
| response->set_id_string(entity.id_string());
|
| }
|
|
|
| - syncable::Directory* dir() {
|
| - return dir_maker_.directory();
|
| - }
|
| + syncable::Directory* dir() { return dir_maker_.directory(); }
|
|
|
| TestIdFactory id_factory_;
|
|
|
| @@ -197,8 +191,8 @@ TEST_F(DirectoryCommitContributionTest, PrepareCommit) {
|
| // The entities in this test have client-style IDs since they've never been
|
| // committed before, so we must use CreateFromClientString to re-create them
|
| // from the commit message.
|
| - ids_for_commit.insert(syncable::Id::CreateFromClientString(
|
| - entity.id_string()));
|
| + ids_for_commit.insert(
|
| + syncable::Id::CreateFromClientString(entity.id_string()));
|
| }
|
|
|
| ASSERT_EQ(3U, ids_for_commit.size());
|
| @@ -241,8 +235,7 @@ TEST_F(DirectoryCommitContributionTest, DeletedItemsWithSpecifics) {
|
|
|
| const sync_pb::CommitMessage& commit_message = message.commit();
|
| ASSERT_EQ(1, commit_message.entries_size());
|
| - EXPECT_TRUE(
|
| - commit_message.entries(0).specifics().has_preference());
|
| + EXPECT_TRUE(commit_message.entries(0).specifics().has_preference());
|
|
|
| pref_cc->CleanUp();
|
| }
|
| @@ -444,24 +437,24 @@ TEST_F(DirectoryCommitContributionTest, ProcessCommitResponseWithAttachments) {
|
| sync_pb::AttachmentMetadata art1_attachments;
|
| AddAttachment(&art1_attachments, true /* is_on_server */);
|
| AddAttachment(&art1_attachments, true /* is_on_server */);
|
| - art1_handle = CreateUnsyncedItemWithAttachments(
|
| - &trans, ARTICLES, "art1", art1_attachments);
|
| + art1_handle = CreateUnsyncedItemWithAttachments(&trans, ARTICLES, "art1",
|
| + art1_attachments);
|
|
|
| // art2 has two attachments, one of which has been uploaded to the
|
| // server. art2 is not eligible to be committed.
|
| sync_pb::AttachmentMetadata art2_attachments;
|
| AddAttachment(&art2_attachments, false /* is_on_server */);
|
| AddAttachment(&art2_attachments, true /* is_on_server */);
|
| - art2_handle = CreateUnsyncedItemWithAttachments(
|
| - &trans, ARTICLES, "art2", art2_attachments);
|
| + art2_handle = CreateUnsyncedItemWithAttachments(&trans, ARTICLES, "art2",
|
| + art2_attachments);
|
|
|
| // art3 has two attachments, neither of which have been uploaded to the
|
| // server. art2 is not eligible to be committed.
|
| sync_pb::AttachmentMetadata art3_attachments;
|
| AddAttachment(&art3_attachments, false /* is_on_server */);
|
| AddAttachment(&art3_attachments, false /* is_on_server */);
|
| - art3_handle = CreateUnsyncedItemWithAttachments(
|
| - &trans, ARTICLES, "art3", art3_attachments);
|
| + art3_handle = CreateUnsyncedItemWithAttachments(&trans, ARTICLES, "art3",
|
| + art3_attachments);
|
| }
|
|
|
| DirectoryTypeDebugInfoEmitter emitter(ARTICLES, &type_observers_);
|
|
|