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

Issue 11314008: sync: Follow-up to conflict resolution refactor (Closed)

Created:
8 years, 1 month ago by rlarocque
Modified:
8 years, 1 month ago
CC:
chromium-reviews, Raghu Simha, haitaol1, akalin, tim (not reviewing)
Visibility:
Public.

Description

sync: Follow-up to conflict resolution refactor This is part two of r164286. That commit refactored the way we handle conflict resolution. This commit takes advantage of those changes to delete lots of code. Because this change deletes session_state.cc, I decided to move the two remaining useful tests session_state_unittest.cc into their own files, sync_session_snapshot_unittest.cc and sync_source_info_unittest.cc. The tests were not modified in any way. None of these changes should have any effect on syncer behaviour: - We can remove the simple conflict counters and related code, since we now assert that all conflicts will be resolved by the end of a successful sync cycle. - We can remove the PerModelSafeGroupState because that struct no longer has any members. - The 'conflicts_resolved' indicators are no longer set, so we can remove them. - Without those indicators, it's no longer possible to have any SYNC_CYCLE_CONTINUATION sync cycles. We can remove a few counters associated with them, as well as the 'has_more_to_sync' flag in the snapshot. - Without SYNC_CYCLE_CONTINUATION cycles, there's no longer any need for code that loops around SyncShare() in SyncSchedulerImpl. The SyncSession::PrepareForAnotherSyncCycle() function is no longer used, either. - The ScopedConflictResolver installed on the session during a sync cycle is no longer used, so all the code related to it can be deleted. BUG=147681, 111280, 156238 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=165474

Patch Set 1 #

Total comments: 13

Patch Set 2 : Update comment, rebase. #

Patch Set 3 : Fix tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -572 lines) Patch
M chrome/browser/sync/about_sync_util.cc View 4 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_harness.cc View 3 chunks +2 lines, -8 lines 0 comments Download
M sync/engine/all_status.cc View 5 chunks +0 lines, -8 lines 0 comments Download
M sync/engine/nudge_source.h View 1 chunk +0 lines, -2 lines 0 comments Download
M sync/engine/nudge_source.cc View 1 chunk +0 lines, -1 line 0 comments Download
M sync/engine/process_updates_command_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M sync/engine/sync_scheduler_impl.cc View 1 3 chunks +5 lines, -19 lines 0 comments Download
M sync/engine/sync_session_job.cc View 1 1 chunk +0 lines, -2 lines 0 comments Download
M sync/engine/syncer.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M sync/engine/syncer.cc View 1 2 chunks +0 lines, -3 lines 0 comments Download
M sync/engine/syncer_unittest.cc View 1 2 chunks +0 lines, -2 lines 0 comments Download
M sync/internal_api/js_sync_manager_observer_unittest.cc View 1 2 chunks +1 line, -3 lines 0 comments Download
M sync/internal_api/public/engine/sync_status.h View 2 chunks +0 lines, -4 lines 0 comments Download
M sync/internal_api/public/engine/sync_status.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M sync/internal_api/public/sessions/model_neutral_state.h View 1 1 chunk +0 lines, -3 lines 0 comments Download
M sync/internal_api/public/sessions/model_neutral_state.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M sync/internal_api/public/sessions/sync_session_snapshot.h View 1 3 chunks +0 lines, -6 lines 0 comments Download
M sync/internal_api/public/sessions/sync_session_snapshot.cc View 1 6 chunks +0 lines, -17 lines 0 comments Download
A + sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc View 1 2 5 chunks +4 lines, -33 lines 0 comments Download
A sync/internal_api/public/sessions/sync_source_info_unittest.cc View 1 chunk +42 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 1 chunk +3 lines, -8 lines 0 comments Download
M sync/protocol/client_debug_info.proto View 1 chunk +1 line, -1 line 0 comments Download
M sync/protocol/get_updates_caller_info.proto View 1 chunk +2 lines, -1 line 0 comments Download
M sync/protocol/proto_enum_conversions_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
D sync/sessions/session_state.h View 1 chunk +0 lines, -33 lines 0 comments Download
D sync/sessions/session_state.cc View 1 chunk +0 lines, -26 lines 0 comments Download
D sync/sessions/session_state_unittest.cc View 1 1 chunk +0 lines, -133 lines 0 comments Download
M sync/sessions/status_controller.h View 1 6 chunks +10 lines, -51 lines 0 comments Download
M sync/sessions/status_controller.cc View 5 chunks +1 line, -64 lines 0 comments Download
M sync/sessions/status_controller_unittest.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M sync/sessions/sync_session.h View 1 4 chunks +0 lines, -12 lines 0 comments Download
M sync/sessions/sync_session.cc View 1 3 chunks +0 lines, -28 lines 0 comments Download
M sync/sessions/sync_session_context.h View 5 chunks +0 lines, -30 lines 0 comments Download
M sync/sessions/sync_session_context.cc View 1 chunk +1 line, -2 lines 0 comments Download
M sync/sessions/sync_session_unittest.cc View 1 5 chunks +0 lines, -43 lines 0 comments Download
M sync/sessions/test_util.h View 1 chunk +0 lines, -2 lines 0 comments Download
M sync/sessions/test_util.cc View 1 2 chunks +0 lines, -9 lines 0 comments Download
M sync/sync.gyp View 1 3 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
rlarocque
This is the follow-up to http://codereview.chromium.org/11192071/. There should be no logic changes in this one. ...
8 years, 1 month ago (2012-10-26 18:35:21 UTC) #1
Nicolas Zea
http://codereview.chromium.org/11314008/diff/1/chrome/browser/sync/about_sync_util.cc File chrome/browser/sync/about_sync_util.cc (left): http://codereview.chromium.org/11314008/diff/1/chrome/browser/sync/about_sync_util.cc#oldcode250 chrome/browser/sync/about_sync_util.cc:250: IntSyncStat simple_conflicts(section_this_cycle, "Simple Conflicts"); It's not clear to me ...
8 years, 1 month ago (2012-10-26 21:14:30 UTC) #2
rlarocque
+Tim for his thoughts on the placment of the unittest.cc files. Should they be under ...
8 years, 1 month ago (2012-10-26 21:41:46 UTC) #3
Nicolas Zea
LGTM with updated comment and once where to place the tests is resolved. http://codereview.chromium.org/11314008/diff/1/chrome/browser/sync/about_sync_util.cc File ...
8 years, 1 month ago (2012-10-26 22:03:26 UTC) #4
tim (not reviewing)
I think the unittests are fine, have a comment below though. Also, I'm hesitant to ...
8 years, 1 month ago (2012-10-26 22:44:05 UTC) #5
rlarocque
Patch rebased and updated. PTAL. http://codereview.chromium.org/11314008/diff/1/sync/protocol/get_updates_caller_info.proto File sync/protocol/get_updates_caller_info.proto (right): http://codereview.chromium.org/11314008/diff/1/sync/protocol/get_updates_caller_info.proto#newcode22 sync/protocol/get_updates_caller_info.proto:22: // No longer sent ...
8 years, 1 month ago (2012-10-31 23:48:20 UTC) #6
tim (not reviewing)
LGTM with fixed tests
8 years, 1 month ago (2012-11-01 00:41:29 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/11314008/14002
8 years, 1 month ago (2012-11-01 18:39:22 UTC) #8
commit-bot: I haz the power
8 years, 1 month ago (2012-11-01 19:38:55 UTC) #9
Change committed as 165474

Powered by Google App Engine
This is Rietveld 408576698