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

Unified Diff: components/sync/syncable/syncable_util.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/syncable/syncable_util.h ('k') | components/sync/syncable/syncable_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/syncable/syncable_util.cc
diff --git a/sync/syncable/syncable_util.cc b/components/sync/syncable/syncable_util.cc
similarity index 80%
rename from sync/syncable/syncable_util.cc
rename to components/sync/syncable/syncable_util.cc
index e1271bf0b602cc69e53be9dc9e7340f2bc6da45a..50c9bde19b0a3777df2767616e493b71850e60f3 100644
--- a/sync/syncable/syncable_util.cc
+++ b/components/sync/syncable/syncable_util.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/syncable/syncable_util.h"
+#include "components/sync/syncable/syncable_util.h"
#include <stdint.h>
@@ -10,11 +10,11 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/sha1.h"
-#include "sync/syncable/directory.h"
-#include "sync/syncable/entry.h"
-#include "sync/syncable/mutable_entry.h"
-#include "sync/syncable/syncable_id.h"
-#include "sync/syncable/syncable_write_transaction.h"
+#include "components/sync/syncable/directory.h"
+#include "components/sync/syncable/entry.h"
+#include "components/sync/syncable/mutable_entry.h"
+#include "components/sync/syncable/syncable_id.h"
+#include "components/sync/syncable/syncable_write_transaction.h"
namespace syncer {
namespace syncable {
@@ -27,7 +27,8 @@ int GetUnsyncedEntries(BaseTransaction* trans, std::vector<int64_t>* handles) {
return handles->size();
}
-bool IsLegalNewParent(BaseTransaction* trans, const Id& entry_id,
+bool IsLegalNewParent(BaseTransaction* trans,
+ const Id& entry_id,
const Id& new_parent_id) {
DCHECK(!entry_id.IsNull());
DCHECK(!new_parent_id.IsNull());
@@ -39,27 +40,24 @@ bool IsLegalNewParent(BaseTransaction* trans, const Id& entry_id,
if (entry_id == ancestor_id)
return false;
Entry new_parent(trans, GET_BY_ID, ancestor_id);
- if (!SyncAssert(new_parent.good(),
- FROM_HERE,
- "Invalid new parent",
- trans))
+ if (!SyncAssert(new_parent.good(), FROM_HERE, "Invalid new parent", trans))
return false;
ancestor_id = new_parent.GetParentId();
}
return true;
}
-void ChangeEntryIDAndUpdateChildren(
- BaseWriteTransaction* trans,
- ModelNeutralMutableEntry* entry,
- const Id& new_id) {
+void ChangeEntryIDAndUpdateChildren(BaseWriteTransaction* trans,
+ ModelNeutralMutableEntry* entry,
+ const Id& new_id) {
Id old_id = entry->GetId();
if (!entry->PutId(new_id)) {
Entry old_entry(trans, GET_BY_ID, new_id);
CHECK(old_entry.good());
LOG(FATAL) << "Attempt to change ID to " << new_id
<< " conflicts with existing entry.\n\n"
- << *entry << "\n\n" << old_entry;
+ << *entry << "\n\n"
+ << old_entry;
}
if (entry->GetIsDir()) {
// Get all child entries of the old id.
@@ -96,8 +94,8 @@ bool SyncAssert(bool condition,
return true;
}
-std::string GenerateSyncableHash(
- ModelType model_type, const std::string& client_tag) {
+std::string GenerateSyncableHash(ModelType model_type,
+ const std::string& client_tag) {
// Blank PB with just the field in it has termination symbol,
// handy for delimiter.
sync_pb::EntitySpecifics serialized_type;
« no previous file with comments | « components/sync/syncable/syncable_util.h ('k') | components/sync/syncable/syncable_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698