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

Issue 10920017: [Sync] Generalize StringOrdinal to handle ordinal_in_parent field (Closed)

Created:
8 years, 3 months ago by akalin
Modified:
8 years, 3 months ago
Reviewers:
rlarocque, Yoyo Zhou
CC:
chromium-reviews, dbeam+watch-ntp_chromium.org, ncarter (slow), mihaip-chromium-reviews_chromium.org, Raghu Simha, Dmitry Titov, dcheng, Aaron Boodman, jennb, jianli, estade+watch_chromium.org, tim (not reviewing)
Visibility:
Public.

Description

[Sync] Generalize StringOrdinal to handle ordinal_in_parent field Rename StringOrdinal to Ordinal, move it to sync/, and templatize it. Make StringOrdinal be an instantiation of Ordinal that matches its previous behavior. Create NodeOrdinal, which is another instantiation of Ordinal for the ordinal_in_parent field in SyncEntity. Rework Ordinal to handle arbitrary byte ranges and to simplify the interpolation code a bit. Generalize StringOrdinal unit tests for Ordinal. Update users of StringOrdinal to prepend syncer::. BUG=145412 TBR=estade@chromium.org,jianli@chromium.org,brettw@chromium.org, Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=155368

Patch Set 1 #

Patch Set 2 : Fix long line #

Patch Set 3 : Try fixing compile errors #

Patch Set 4 : Fix another compile error #

Total comments: 33

Patch Set 5 : Address comments #

Patch Set 6 : Fix comment location #

Total comments: 4

Patch Set 7 : Address comments #

Total comments: 2

Patch Set 8 : Relax tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1461 lines, -820 lines) Patch
M chrome/browser/extensions/app_process_apitest.cc View 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/app_sync_data.h View 4 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/extensions/app_sync_data.cc View 1 2 3 4 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/extensions/app_sync_data_unittest.cc View 1 2 3 4 4 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/extensions/crx_installer.h View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_browsertest.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_prefs.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_prefs.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_prefs_unittest.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 2 3 4 7 chunks +12 lines, -10 lines 0 comments Download
M chrome/browser/extensions/extension_sorting.h View 6 chunks +26 lines, -22 lines 0 comments Download
M chrome/browser/extensions/extension_sorting.cc View 1 2 3 4 19 chunks +57 lines, -54 lines 0 comments Download
M chrome/browser/extensions/extension_sorting_unittest.cc View 32 chunks +110 lines, -98 lines 0 comments Download
M chrome/browser/extensions/extension_sync_data.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/test_extension_prefs.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/unpacked_installer.cc View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/media_gallery/media_galleries_preferences_unittest.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/sync/test/integration/apps_helper.h View 1 2 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/sync/test/integration/apps_helper.cc View 1 chunk +9 lines, -8 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_app_helper.h View 2 chunks +10 lines, -8 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_app_helper.cc View 5 chunks +14 lines, -13 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_extension_helper.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_apps_sync_test.cc View 5 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/ui/panels/base_panel_browser_test.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/panels/old_base_panel_browser_test.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/ntp/app_launcher_handler.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/ntp/app_launcher_handler.cc View 1 2 3 4 5 chunks +5 lines, -5 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
D chrome/common/string_ordinal.h View 1 chunk +0 lines, -92 lines 0 comments Download
D chrome/common/string_ordinal.cc View 1 chunk +0 lines, -269 lines 0 comments Download
D chrome/common/string_ordinal_unittest.cc View 1 chunk +0 lines, -174 lines 0 comments Download
A sync/api/string_ordinal.h View 1 2 3 4 5 6 1 chunk +47 lines, -0 lines 0 comments Download
A sync/internal_api/public/base/node_ordinal.h View 1 2 3 4 1 chunk +55 lines, -0 lines 0 comments Download
A sync/internal_api/public/base/node_ordinal.cc View 1 2 3 4 5 1 chunk +47 lines, -0 lines 0 comments Download
A sync/internal_api/public/base/node_ordinal_unittest.cc View 1 2 3 4 1 chunk +125 lines, -0 lines 0 comments Download
A sync/internal_api/public/base/ordinal.h View 1 2 3 4 1 chunk +486 lines, -0 lines 0 comments Download
A sync/internal_api/public/base/ordinal_unittest.cc View 1 2 3 4 5 6 7 1 chunk +376 lines, -0 lines 0 comments Download
M sync/protocol/sync.proto View 1 chunk +1 line, -1 line 0 comments Download
M sync/sync.gyp View 1 2 3 4 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
akalin
+tim for sync/ and c/b/sync stuff +asargent for c/b/extensions
8 years, 3 months ago (2012-08-30 20:28:25 UTC) #1
akalin
Ping!
8 years, 3 months ago (2012-08-31 21:31:35 UTC) #2
akalin
-tim +rlarocque for review
8 years, 3 months ago (2012-09-05 17:06:11 UTC) #3
rlarocque
Taking a break for now. I might have more comments to add later. http://codereview.chromium.org/10920017/diff/7043/sync/api/string_ordinal.h File ...
8 years, 3 months ago (2012-09-05 21:43:46 UTC) #4
akalin
forgot to actually +asargent
8 years, 3 months ago (2012-09-06 00:04:54 UTC) #5
asargent_no_longer_on_chrome
I'm swamped at the moment and need to defer some reviews for a few days ...
8 years, 3 months ago (2012-09-06 16:31:37 UTC) #6
akalin
moving from asargent to yoz
8 years, 3 months ago (2012-09-06 18:59:21 UTC) #7
akalin
Addressed all comments, PTAL http://codereview.chromium.org/10920017/diff/7043/sync/api/string_ordinal.h File sync/api/string_ordinal.h (right): http://codereview.chromium.org/10920017/diff/7043/sync/api/string_ordinal.h#newcode1 sync/api/string_ordinal.h:1: // Copyright (c) 2012 The ...
8 years, 3 months ago (2012-09-06 19:25:14 UTC) #8
Yoyo Zhou
From an extensions perspective, it is weird that StringOrdinal now is in sync/ since the ...
8 years, 3 months ago (2012-09-06 21:18:39 UTC) #9
Yoyo Zhou
On 2012/09/06 21:18:39, Yoyo Zhou wrote: > From an extensions perspective, it is weird that ...
8 years, 3 months ago (2012-09-06 21:20:42 UTC) #10
rlarocque
Mostly there. I think the only thing holding this back now is testing for the ...
8 years, 3 months ago (2012-09-06 21:25:55 UTC) #11
akalin
On 2012/09/06 21:18:39, Yoyo Zhou wrote: > From an extensions perspective, it is weird that ...
8 years, 3 months ago (2012-09-06 22:33:21 UTC) #12
akalin
PTAL! http://codereview.chromium.org/10920017/diff/7043/sync/internal_api/public/base/node_ordinal.cc File sync/internal_api/public/base/node_ordinal.cc (right): http://codereview.chromium.org/10920017/diff/7043/sync/internal_api/public/base/node_ordinal.cc#newcode13 sync/internal_api/public/base/node_ordinal.cc:13: y ^= 0x8000000000000000ULL; On 2012/09/06 21:25:55, rlarocque wrote: ...
8 years, 3 months ago (2012-09-06 22:55:25 UTC) #13
Yoyo Zhou
On 2012/09/06 22:33:21, akalin wrote: > On 2012/09/06 21:18:39, Yoyo Zhou wrote: > > From ...
8 years, 3 months ago (2012-09-06 23:16:34 UTC) #14
rlarocque
LGTM. http://codereview.chromium.org/10920017/diff/14008/sync/internal_api/public/base/ordinal_unittest.cc File sync/internal_api/public/base/ordinal_unittest.cc (right): http://codereview.chromium.org/10920017/diff/14008/sync/internal_api/public/base/ordinal_unittest.cc#newcode214 sync/internal_api/public/base/ordinal_unittest.cc:214: EXPECT_EQ("INVALID[]", TestOrdinal().ToDebugString()); IMO, this is a bit too ...
8 years, 3 months ago (2012-09-06 23:19:20 UTC) #15
akalin
Committing via CQ http://codereview.chromium.org/10920017/diff/14008/sync/internal_api/public/base/ordinal_unittest.cc File sync/internal_api/public/base/ordinal_unittest.cc (right): http://codereview.chromium.org/10920017/diff/14008/sync/internal_api/public/base/ordinal_unittest.cc#newcode214 sync/internal_api/public/base/ordinal_unittest.cc:214: EXPECT_EQ("INVALID[]", TestOrdinal().ToDebugString()); On 2012/09/06 23:19:21, rlarocque ...
8 years, 3 months ago (2012-09-06 23:44:32 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/10920017/8134
8 years, 3 months ago (2012-09-06 23:46:10 UTC) #17
commit-bot: I haz the power
Presubmit check for 10920017-8134 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 3 months ago (2012-09-06 23:46:25 UTC) #18
akalin
TBRing various folks
8 years, 3 months ago (2012-09-06 23:56:48 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/10920017/8134
8 years, 3 months ago (2012-09-06 23:57:54 UTC) #20
commit-bot: I haz the power
8 years, 3 months ago (2012-09-07 12:53:03 UTC) #21
Change committed as 155368

Powered by Google App Engine
This is Rietveld 408576698