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

Unified Diff: components/sync/engine_impl/get_commit_ids.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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/engine_impl/get_commit_ids.h ('k') | components/sync/engine_impl/get_updates_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)) {
« no previous file with comments | « components/sync/engine_impl/get_commit_ids.h ('k') | components/sync/engine_impl/get_updates_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698