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

Issue 217063005: Separate SyncData methods into three groups, local, remote, and common. (Closed)

Created:
6 years, 9 months ago by maniscalco
Modified:
6 years, 8 months ago
CC:
chromium-reviews, tim+watch_chromium.org, extensions-reviews_chromium.org, haitaol+watch_chromium.org, browser-components-watch_chromium.org, rouslan+spellwatch_chromium.org, groby+spellwatch_chromium.org, chromium-apps-reviews_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@syncapi
Visibility:
Public.

Description

Separate SyncData methods into three groups, local, remote, and common. SyncData objects come in two varieties, local and remote. Local SyncData are those that originiate from datatype code (CreateLocalData). Remote SyncData originate from sync (CreateRemoteData). This change adds SyncDataLocal and SyncDataRemote. The purpose of this change is to make clear which methods may be called on a given SyncData instance. Local methods are accessed via SyncData::AsLocal(). Remote methods via SyncData::AsRemote(). TBR=brettw BUG=357305 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261273

Patch Set 1 : #

Total comments: 6

Patch Set 2 : Remove Remote from names of GetRemoteModifiedTime and GetRemoteId. #

Patch Set 3 : Move data members out of SyncData and into SyncData::Local and SyncData::Remote where possible. #

Patch Set 4 : Reorganize Local and Remote based on offline feedback. #

Total comments: 4

Patch Set 5 : Remove AsLocal and AsRemote methods from SyncData. #

Total comments: 2

Patch Set 6 : Apply CR feedback and use a named SyncDataLocal in a couple places where it makes sense. #

Patch Set 7 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+207 lines, -161 lines) Patch
M chrome/browser/extensions/api/storage/settings_sync_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/app_sync_bundle.cc View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_sync_bundle.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/history/history_unittest.cc View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/glue/favicon_cache_unittest.cc View 1 2 3 4 4 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/sync/glue/generic_change_processor.cc View 1 2 3 4 4 chunks +10 lines, -8 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_preference_unittest.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/sessions2/sessions_sync_manager.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/sessions2/sessions_sync_manager_unittest.cc View 1 2 3 4 18 chunks +40 lines, -24 lines 0 comments Download
M sync/api/sync_change.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M sync/api/sync_change_unittest.cc View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M sync/api/sync_data.h View 1 2 3 4 5 chunks +74 lines, -63 lines 0 comments Download
M sync/api/sync_data.cc View 1 2 3 4 4 chunks +44 lines, -35 lines 0 comments Download
M sync/api/sync_data_unittest.cc View 1 2 3 4 6 chunks +10 lines, -10 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
maniscalco
Hey Tim, mind taking a look? This is a follow up CL to the Sync ...
6 years, 9 months ago (2014-03-28 20:59:34 UTC) #1
tim (not reviewing)
https://codereview.chromium.org/217063005/diff/20001/sync/api/sync_data.h File sync/api/sync_data.h (right): https://codereview.chromium.org/217063005/diff/20001/sync/api/sync_data.h#newcode112 sync/api/sync_data.h:112: class Local { I guess I was imagining we ...
6 years, 9 months ago (2014-03-28 21:16:02 UTC) #2
maniscalco
https://codereview.chromium.org/217063005/diff/20001/sync/api/sync_data.h File sync/api/sync_data.h (right): https://codereview.chromium.org/217063005/diff/20001/sync/api/sync_data.h#newcode112 sync/api/sync_data.h:112: class Local { On 2014/03/28 21:16:02, timsteele wrote: > ...
6 years, 9 months ago (2014-03-28 21:45:13 UTC) #3
maniscalco
Move data members out of SyncData and into SyncData::Local and SyncData::Remote where possible.
6 years, 9 months ago (2014-03-28 22:03:35 UTC) #4
maniscalco
I've updated this CL based on our offline discussion. RFAL!
6 years, 8 months ago (2014-03-31 20:31:12 UTC) #5
tim (not reviewing)
looking better! https://codereview.chromium.org/217063005/diff/80001/sync/api/sync_data.h File sync/api/sync_data.h (right): https://codereview.chromium.org/217063005/diff/80001/sync/api/sync_data.h#newcode101 sync/api/sync_data.h:101: SyncDataLocal AsLocal() const; Hmm. Given that there's ...
6 years, 8 months ago (2014-03-31 22:38:11 UTC) #6
maniscalco
All feedback applied. RFAL. https://codereview.chromium.org/217063005/diff/80001/sync/api/sync_data.h File sync/api/sync_data.h (right): https://codereview.chromium.org/217063005/diff/80001/sync/api/sync_data.h#newcode101 sync/api/sync_data.h:101: SyncDataLocal AsLocal() const; On 2014/03/31 ...
6 years, 8 months ago (2014-03-31 23:11:07 UTC) #7
tim (not reviewing)
LGTM https://codereview.chromium.org/217063005/diff/100001/sync/api/sync_change.cc File sync/api/sync_change.cc (right): https://codereview.chromium.org/217063005/diff/100001/sync/api/sync_change.cc#newcode37 sync/api/sync_change.cc:37: if (sync_data_local.GetTag().empty() || SyncDataLocal(sync_data_).GetTag() ?
6 years, 8 months ago (2014-03-31 23:24:24 UTC) #8
maniscalco
Thanks for reviewing! https://codereview.chromium.org/217063005/diff/100001/sync/api/sync_change.cc File sync/api/sync_change.cc (right): https://codereview.chromium.org/217063005/diff/100001/sync/api/sync_change.cc#newcode37 sync/api/sync_change.cc:37: if (sync_data_local.GetTag().empty() || On 2014/03/31 23:24:24, ...
6 years, 8 months ago (2014-03-31 23:33:54 UTC) #9
maniscalco
rlp@, would you please review c/b/spellchecker/spellcheck_custom_dictionary_unittest.cc brettw@, would you please review c/b/history/history_unittest.cc asargent@, would you ...
6 years, 8 months ago (2014-04-01 16:15:09 UTC) #10
rpetterson
spellchecker LGTM
6 years, 8 months ago (2014-04-01 17:56:39 UTC) #11
asargent_no_longer_on_chrome
chrome/browser/extensions LGTM
6 years, 8 months ago (2014-04-01 20:40:30 UTC) #12
maniscalco
TBR=brettw for chrome/browser/history/history_unittest.cc
6 years, 8 months ago (2014-04-02 17:38:20 UTC) #13
maniscalco
The CQ bit was checked by maniscalco@chromium.org
6 years, 8 months ago (2014-04-02 17:38:43 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/maniscalco@chromium.org/217063005/140001
6 years, 8 months ago (2014-04-02 17:39:18 UTC) #15
brettw
lgtm
6 years, 8 months ago (2014-04-02 17:49:59 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-02 21:05:06 UTC) #17
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) base_unittests, base_unittests_swarm, browser_tests, browser_tests_swarm, interactive_ui_tests, interactive_ui_tests_swarm, ...
6 years, 8 months ago (2014-04-02 21:05:07 UTC) #18
maniscalco
The CQ bit was checked by maniscalco@chromium.org
6 years, 8 months ago (2014-04-02 21:11:37 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/maniscalco@chromium.org/217063005/140001
6 years, 8 months ago (2014-04-02 21:12:39 UTC) #20
commit-bot: I haz the power
6 years, 8 months ago (2014-04-03 04:14:30 UTC) #21
Message was sent while issue was closed.
Change committed as 261273

Powered by Google App Engine
This is Rietveld 408576698