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

Unified Diff: net/tools/testserver/chromiumsync.py

Issue 8526018: [Sync] Remove logging/checks for case where server and local entries mismatch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modify testserver. Fix VerifyUpdates Created 9 years, 1 month 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 | « chrome/browser/sync/engine/syncer_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/testserver/chromiumsync.py
diff --git a/net/tools/testserver/chromiumsync.py b/net/tools/testserver/chromiumsync.py
index 9e8cb84e683a90103d41d01f68293e7edff7d404..b8a5f7079d364383c5018615640f8c85ace4e2c5 100755
--- a/net/tools/testserver/chromiumsync.py
+++ b/net/tools/testserver/chromiumsync.py
@@ -16,6 +16,7 @@ import pickle
import random
import sys
import threading
+import time
import urlparse
import app_notification_specifics_pb2
@@ -82,6 +83,9 @@ SYNC_TYPE_TO_EXTENSION = {
# The parent ID used to indicate a top-level node.
ROOT_ID = '0'
+# Unix time epoch in struct_time format. The tuple corresponds to UTC Wednesday
+# Jan 1 1970, 00:00:00, non-dst.
+UNIX_TIME_EPOCH = (1970, 1, 1, 0, 0, 0, 3, 1, 0)
class Error(Exception):
"""Error class for this module."""
@@ -462,6 +466,9 @@ class SyncDataModel(object):
entry.originator_client_item_id = base_entry.originator_client_item_id
self._entries[entry.id_string] = copy.deepcopy(entry)
+ # Store the current time since the Unix epoch in milliseconds.
+ self._entries[entry.id_string].mtime = \
ncarter (slow) 2011/11/11 03:07:53 Don't escape newlines, use parens instead.
Nicolas Zea 2011/11/11 19:23:33 Done.
+ int((time.mktime(time.gmtime()) - time.mktime(UNIX_TIME_EPOCH))*1000)
def _ServerTagToId(self, tag):
"""Determine the server ID from a server-unique tag.
« no previous file with comments | « chrome/browser/sync/engine/syncer_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698