summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/engine/syncer_util.h
diff options
context:
space:
mode:
authorchron@google.com <chron@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-20 01:41:34 +0000
committerchron@google.com <chron@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-20 01:41:34 +0000
commit82b1cd9fc88d353b541064e52c4ed408033a43cf (patch)
tree8c1f99401a75dc522d9cab6365638fe1eb8ac51c /chrome/browser/sync/engine/syncer_util.h
parentd6d807a12ec32b7bba68977bddad412c9dccc5a0 (diff)
downloadchromium_src-82b1cd9fc88d353b541064e52c4ed408033a43cf.zip
chromium_src-82b1cd9fc88d353b541064e52c4ed408033a43cf.tar.gz
chromium_src-82b1cd9fc88d353b541064e52c4ed408033a43cf.tar.bz2
Remove unique naming from syncer! This reduces the complexity. Modify the index to store things with parent id and metahandle instead of parent id and name.
Add a template function for extracting name from proto buffers. Refactor some unit tests to work without unique naming. Remove path calls since they make no sense without unique names. Remove find by parentID and names. Remove unique name resolution from conflict resolver. Remove syncable name class. TEST=included unit tests Review URL: http://codereview.chromium.org/371029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32583 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/engine/syncer_util.h')
-rwxr-xr-x[-rw-r--r--]chrome/browser/sync/engine/syncer_util.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/chrome/browser/sync/engine/syncer_util.h b/chrome/browser/sync/engine/syncer_util.h
index cf9d9c7..9f38873 100644..100755
--- a/chrome/browser/sync/engine/syncer_util.h
+++ b/chrome/browser/sync/engine/syncer_util.h
@@ -26,12 +26,6 @@ class SyncEntity;
class SyncerUtil {
public:
- // TODO(ncarter): Remove unique-in-parent title support and name conflicts.
- static syncable::Id GetNameConflictingItemId(
- syncable::BaseTransaction* trans,
- const syncable::Id& parent_id,
- const PathString& server_name);
-
static void ChangeEntryIDAndUpdateChildren(
syncable::WriteTransaction* trans,
syncable::MutableEntry* entry,
@@ -56,16 +50,12 @@ class SyncerUtil {
syncable::MutableEntry* const entry,
ConflictResolver* resolver);
- static UpdateAttemptResponse AttemptToUpdateEntryWithoutMerge(
- syncable::WriteTransaction* const trans,
- syncable::MutableEntry* const entry,
- syncable::Id* const conflicting_id);
// Pass in name to avoid redundant UTF8 conversion.
static void UpdateServerFieldsFromUpdate(
syncable::MutableEntry* local_entry,
const SyncEntity& server_entry,
- const syncable::SyncName& name);
+ const PathString& name);
static void ApplyExtendedAttributes(
syncable::MutableEntry* local_entry,
@@ -186,6 +176,7 @@ inline bool ClientAndServerTimeMatch(int64 client_time, int64 server_time) {
// The sync server uses Java Times (ms since 1970)
// and the client uses FILETIMEs (ns since 1601) so we need to convert
// between the timescales.
+// TODO(sync): Fix this. No need to use two timescales.
inline int64 ServerTimeToClientTime(int64 server_time) {
return server_time * GG_LONGLONG(10000) + GG_LONGLONG(116444736000000000);
}