Index: components/sync/engine_impl/get_commit_ids.cc |
diff --git a/sync/engine/get_commit_ids.cc b/components/sync/engine_impl/get_commit_ids.cc |
similarity index 95% |
rename from sync/engine/get_commit_ids.cc |
rename to components/sync/engine_impl/get_commit_ids.cc |
index a4c7f6b7f7944f97b1c2b44a37af5115608e7aec..fec5a728d605610e8253efb8674efa72981d1a47 100644 |
--- a/sync/engine/get_commit_ids.cc |
+++ b/components/sync/engine_impl/get_commit_ids.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/get_commit_ids.h" |
+#include "components/sync/engine_impl/get_commit_ids.h" |
#include <stddef.h> |
#include <stdint.h> |
@@ -11,14 +11,14 @@ |
#include <vector> |
#include "base/macros.h" |
-#include "sync/engine/syncer_util.h" |
-#include "sync/syncable/directory.h" |
-#include "sync/syncable/entry.h" |
-#include "sync/syncable/nigori_handler.h" |
-#include "sync/syncable/nigori_util.h" |
-#include "sync/syncable/syncable_base_transaction.h" |
-#include "sync/syncable/syncable_util.h" |
-#include "sync/util/cryptographer.h" |
+#include "components/sync/base/cryptographer.h" |
+#include "components/sync/engine_impl/syncer_util.h" |
+#include "components/sync/syncable/directory.h" |
+#include "components/sync/syncable/entry.h" |
+#include "components/sync/syncable/nigori_handler.h" |
+#include "components/sync/syncable/nigori_util.h" |
+#include "components/sync/syncable/syncable_base_transaction.h" |
+#include "components/sync/syncable/syncable_util.h" |
using std::set; |
using std::vector; |
@@ -52,11 +52,10 @@ void OrderCommitIds(syncable::BaseTransaction* trans, |
} // namespace |
-void GetCommitIdsForType( |
- syncable::BaseTransaction* trans, |
- ModelType type, |
- size_t max_entries, |
- syncable::Directory::Metahandles* out) { |
+void GetCommitIdsForType(syncable::BaseTransaction* trans, |
+ ModelType type, |
+ size_t max_entries, |
+ syncable::Directory::Metahandles* out) { |
syncable::Directory* dir = trans->directory(); |
// Gather the full set of unsynced items and store it in the session. They |
@@ -77,11 +76,8 @@ void GetCommitIdsForType( |
// new set of ready and unsynced items is then what we use to determine what |
// is a candidate for commit. The caller is responsible for ensuring that no |
// throttled types are included among the requested_types. |
- FilterUnreadyEntries(trans, |
- ModelTypeSet(type), |
- encrypted_types, |
- passphrase_missing, |
- all_unsynced_handles, |
+ FilterUnreadyEntries(trans, ModelTypeSet(type), encrypted_types, |
+ passphrase_missing, all_unsynced_handles, |
&ready_unsynced_set); |
OrderCommitIds(trans, max_entries, ready_unsynced_set, out); |
@@ -94,14 +90,12 @@ void GetCommitIdsForType( |
namespace { |
bool IsEntryInConflict(const syncable::Entry& entry) { |
- if (entry.GetIsUnsynced() && |
- entry.GetServerVersion() > 0 && |
+ if (entry.GetIsUnsynced() && entry.GetServerVersion() > 0 && |
(entry.GetServerVersion() > entry.GetBaseVersion())) { |
// The local and server versions don't match. The item must be in |
// conflict, so there's no point in attempting to commit. |
DCHECK(entry.GetIsUnappliedUpdate()); |
- DVLOG(1) << "Excluding entry from commit due to version mismatch " |
- << entry; |
+ DVLOG(1) << "Excluding entry from commit due to version mismatch " << entry; |
return true; |
} |
return false; |
@@ -496,9 +490,7 @@ void Traversal::AddCreatesAndMoves( |
if (HaveItem(metahandle)) |
continue; |
- syncable::Entry entry(trans_, |
- syncable::GET_BY_HANDLE, |
- metahandle); |
+ syncable::Entry entry(trans_, syncable::GET_BY_HANDLE, metahandle); |
if (!entry.GetIsDel()) { |
if (SupportsHierarchy(entry)) { |
// We only commit an item + its dependencies if it and all its |
@@ -538,8 +530,7 @@ void Traversal::AddDeletes(const std::set<int64_t>& ready_unsynced_set) { |
continue; |
} |
- syncable::Entry entry(trans_, syncable::GET_BY_HANDLE, |
- metahandle); |
+ syncable::Entry entry(trans_, syncable::GET_BY_HANDLE, metahandle); |
if (entry.GetIsDel()) { |
if (SupportsHierarchy(entry)) { |