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

Issue 7981006: [Sync] use base::Time in sync (Closed)

Created:
9 years, 3 months ago by akalin
Modified:
9 years, 3 months ago
CC:
chromium-reviews, Raghu Simha, ncarter (slow), Paweł Hajdan Jr., tim (not reviewing), idana, Yaron
Visibility:
Public.

Description

[Sync] use base::Time in sync Make EntryKernel/Entry/BaseNode use base::Time instead of int64s. Add sync/util/time.h, with utility functions to manage the sync proto time format. Store times on disk in proto format instead of the local system. This requires a database version bump (to 77). Update SessionChangeProcessor/SessionModelAssociator to use base::Time, too. Remove hackish Now() function. Remove ZeroFields() function, and instead zero-initialize in EntryKernel::EntryKernel() directly. BUG= TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102184 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102218

Patch Set 1 #

Patch Set 2 : Fix win compile error #

Total comments: 10

Patch Set 3 : Fix unit tests #

Patch Set 4 : Sync to head, fix comment and lint #

Total comments: 2

Patch Set 5 : Address comments #

Patch Set 6 : Fix copyright #

Patch Set 7 : fix linux compile errors #

Unified diffs Side-by-side diffs Delta from patch set Stats (+940 lines, -422 lines) Patch
M chrome/browser/sync/engine/build_commit_command.cc View 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/sync/engine/process_commit_response_command.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/syncer.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/engine/syncer_proto_util.cc View 5 chunks +11 lines, -8 lines 0 comments Download
M chrome/browser/sync/engine/syncer_unittest.cc View 1 2 3 4 5 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/sync/engine/syncer_util.h View 2 chunks +0 lines, -38 lines 0 comments Download
M chrome/browser/sync/engine/syncer_util.cc View 1 2 3 4 4 chunks +7 lines, -10 lines 0 comments Download
M chrome/browser/sync/glue/session_change_processor.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/glue/session_model_associator.h View 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/session_model_associator.cc View 1 2 3 4 8 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/sync/glue/session_model_associator_unittest.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/internal_api/base_node.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/internal_api/base_node.cc View 1 2 3 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/sync/internal_api/syncapi_unittest.cc View 1 2 3 4 5 3 chunks +9 lines, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_session_unittest.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session_unittest.cc View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/sync/syncable/directory_backing_store.h View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/sync/syncable/directory_backing_store.cc View 1 2 3 4 9 chunks +54 lines, -12 lines 0 comments Download
M chrome/browser/sync/syncable/directory_backing_store_unittest.cc View 1 2 3 4 5 6 20 chunks +653 lines, -236 lines 0 comments Download
M chrome/browser/sync/syncable/syncable.h View 1 2 3 4 5 10 chunks +40 lines, -14 lines 0 comments Download
M chrome/browser/sync/syncable/syncable.cc View 1 2 3 4 5 10 chunks +30 lines, -54 lines 0 comments Download
M chrome/browser/sync/syncable/syncable_columns.h View 1 2 3 4 5 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/sync/syncable/syncable_enum_conversions.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/sync/syncable/syncable_enum_conversions.cc View 1 chunk +13 lines, -3 lines 0 comments Download
M chrome/browser/sync/syncable/syncable_enum_conversions_unittest.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/sync/syncable/syncable_unittest.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/sync/util/sqlite_utils.cc View 1 chunk +1 line, -0 lines 0 comments Download
A chrome/browser/sync/util/time.h View 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/browser/sync/util/time.cc View 1 chunk +24 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
akalin
+zea for review
9 years, 3 months ago (2011-09-20 17:47:58 UTC) #1
Nicolas Zea
http://codereview.chromium.org/7981006/diff/3001/chrome/browser/sync/engine/syncer_util.cc File chrome/browser/sync/engine/syncer_util.cc (right): http://codereview.chromium.org/7981006/diff/3001/chrome/browser/sync/engine/syncer_util.cc#newcode429 chrome/browser/sync/engine/syncer_util.cc:429: target->Put(SERVER_CTIME, browser_sync::ProtoTimeToTime(update.ctime())); I believe you can remove the browser_sync ...
9 years, 3 months ago (2011-09-21 18:09:12 UTC) #2
akalin
Addressed all comments, PTAL. http://codereview.chromium.org/7981006/diff/3001/chrome/browser/sync/engine/syncer_util.cc File chrome/browser/sync/engine/syncer_util.cc (right): http://codereview.chromium.org/7981006/diff/3001/chrome/browser/sync/engine/syncer_util.cc#newcode429 chrome/browser/sync/engine/syncer_util.cc:429: target->Put(SERVER_CTIME, browser_sync::ProtoTimeToTime(update.ctime())); On 2011/09/21 18:09:12, ...
9 years, 3 months ago (2011-09-21 19:37:35 UTC) #3
Nicolas Zea
lgtm
9 years, 3 months ago (2011-09-21 19:49:09 UTC) #4
commit-bot: I haz the power
9 years, 3 months ago (2011-09-21 21:25:02 UTC) #5
Presubmit check for 7981006-3005 failed and returned exit status 1.

Running presubmit commit checks ...

** Presubmit Messages **
If this change has an associated bug, add BUG=[bug number].

If this change requires manual test instructions to QA team, add
TEST=[instructions].

** Presubmit Warnings **
Found lines longer than 80 characters (first 5 shown).
  chrome/browser/sync/syncable/directory_backing_store_unittest.cc, line 94, 127
chars

Presubmit checks took 3.1s to calculate.

Powered by Google App Engine
This is Rietveld 408576698