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

Issue 9113024: Add return values to SyncerCommand (Closed)

Created:
8 years, 11 months ago by rlarocque
Modified:
8 years, 11 months ago
CC:
chromium-reviews, Raghu Simha, ncarter (slow), akalin, tim (not reviewing)
Visibility:
Public.

Description

Add return values to SyncerCommand This is part 1 of 3 in a series of patches to remove the unnecessary SYNC_CYCLE_CONTINUATION sync cycle that follows every sync commit. In this patch, we add a return value to all SyncerCommands. This will make it easier for us to tell when a command has failed, and why. Currently, the error detection does not work very well. We don't have much support for errors that occur on worker threads. Many commands will return an error only in case of directory lookup failure, but return NO_ERROR otherwise. This is OK because we're not aiming to fully implement error detection in this commit. This provides a base we can build on in future commits. BUG=94670, 109422 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=116963

Patch Set 1 #

Total comments: 6

Patch Set 2 : Update for review comments #

Total comments: 33

Patch Set 3 : Response to Tim's comments #

Patch Set 4 : More fixes + update copyrights #

Patch Set 5 : s/NO_ERROR/SYNCER_OK/ #

Patch Set 6 : Add DEPS exception for syncer_error.h #

Patch Set 7 : Move syncer_error.* to internal_api/includes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+307 lines, -187 lines) Patch
M chrome/browser/sync/engine/apply_updates_command.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/apply_updates_command.cc View 1 2 3 4 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/sync/engine/build_and_process_conflict_sets_command.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/build_commit_command.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/build_commit_command.cc View 1 2 3 4 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/cleanup_disabled_types_command.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/cleanup_disabled_types_command.cc View 1 2 3 4 3 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/sync/engine/clear_data_command.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/clear_data_command.cc View 1 2 3 4 5 chunks +9 lines, -3 lines 0 comments Download
M chrome/browser/sync/engine/download_updates_command.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/download_updates_command.cc View 1 2 3 4 5 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/sync/engine/get_commit_ids_command.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/get_commit_ids_command.cc View 1 2 3 4 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/model_changing_syncer_command.h View 1 2 3 4 chunks +9 lines, -11 lines 0 comments Download
M chrome/browser/sync/engine/model_changing_syncer_command.cc View 1 2 3 4 3 chunks +16 lines, -11 lines 0 comments Download
M chrome/browser/sync/engine/model_changing_syncer_command_unittest.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/model_safe_worker.h View 1 2 3 4 5 6 4 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/sync/engine/model_safe_worker.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/sync/engine/passive_model_worker.h View 1 2 3 4 5 6 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/passive_model_worker.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/post_commit_message_command.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/post_commit_message_command.cc View 1 2 3 4 3 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/sync/engine/process_commit_response_command.h View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/sync/engine/process_commit_response_command.cc View 1 2 3 4 7 chunks +25 lines, -17 lines 0 comments Download
M chrome/browser/sync/engine/process_updates_command.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/process_updates_command.cc View 1 2 3 4 3 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/sync/engine/resolve_conflicts_command.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/resolve_conflicts_command.cc View 1 2 3 4 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/sync/engine/store_timestamps_command.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/store_timestamps_command.cc View 1 2 3 4 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/sync/engine/syncer_command.h View 1 2 3 4 5 6 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/sync/engine/syncer_command.cc View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/sync/engine/verify_updates_command.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/verify_updates_command.cc View 1 2 3 4 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/browser_thread_model_worker.h View 1 2 3 4 5 6 6 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/sync/glue/browser_thread_model_worker.cc View 1 2 3 5 chunks +12 lines, -12 lines 0 comments Download
M chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc View 1 2 3 4 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/sync/glue/history_model_worker.h View 1 2 3 3 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/history_model_worker.cc View 1 2 3 4 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/sync/glue/password_model_worker.h View 1 2 3 4 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/sync/glue/password_model_worker.cc View 1 2 3 2 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/sync/glue/ui_model_worker.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/ui_model_worker.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/ui_model_worker_unittest.cc View 1 2 3 4 3 chunks +4 lines, -5 lines 0 comments Download
A chrome/browser/sync/internal_api/includes/syncer_error.h View 1 2 3 4 5 6 1 chunk +46 lines, -0 lines 0 comments Download
A chrome/browser/sync/internal_api/includes/syncer_error.cc View 1 2 3 4 5 6 1 chunk +36 lines, -0 lines 0 comments Download
M chrome/browser/sync/test/engine/fake_model_worker.h View 1 2 3 4 5 6 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/engine/fake_model_worker.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
rlarocque
Please review. This is part of the series towards removing the unnecessary SYNC_CYCLE_CONTINUATION. The squashed ...
8 years, 11 months ago (2012-01-05 21:30:26 UTC) #1
lipalani1
The second comment is the most important one. http://codereview.chromium.org/9113024/diff/1/chrome/browser/sync/engine/clear_data_command.cc File chrome/browser/sync/engine/clear_data_command.cc (right): http://codereview.chromium.org/9113024/diff/1/chrome/browser/sync/engine/clear_data_command.cc#newcode61 chrome/browser/sync/engine/clear_data_command.cc:61: // ...
8 years, 11 months ago (2012-01-05 22:59:41 UTC) #2
rlarocque
Patch updated. http://codereview.chromium.org/9113024/diff/1/chrome/browser/sync/engine/clear_data_command.cc File chrome/browser/sync/engine/clear_data_command.cc (right): http://codereview.chromium.org/9113024/diff/1/chrome/browser/sync/engine/clear_data_command.cc#newcode61 chrome/browser/sync/engine/clear_data_command.cc:61: // On 2012/01/05 22:59:41, lipalani1 wrote: > ...
8 years, 11 months ago (2012-01-06 00:24:31 UTC) #3
tim (not reviewing)
Nice change. Mostly nits, with a few meatier suggestions. http://codereview.chromium.org/9113024/diff/2002/chrome/browser/sync/engine/clear_data_command.cc File chrome/browser/sync/engine/clear_data_command.cc (right): http://codereview.chromium.org/9113024/diff/2002/chrome/browser/sync/engine/clear_data_command.cc#newcode60 chrome/browser/sync/engine/clear_data_command.cc:60: ...
8 years, 11 months ago (2012-01-06 16:33:42 UTC) #4
rlarocque
New patch uploaded. http://codereview.chromium.org/9113024/diff/2002/chrome/browser/sync/engine/clear_data_command.cc File chrome/browser/sync/engine/clear_data_command.cc (right): http://codereview.chromium.org/9113024/diff/2002/chrome/browser/sync/engine/clear_data_command.cc#newcode60 chrome/browser/sync/engine/clear_data_command.cc:60: // this code is unreachable. We ...
8 years, 11 months ago (2012-01-06 19:44:20 UTC) #5
tim (not reviewing)
Thanks! Just one last comment below, and also, you'll get presubmit errors for all modified ...
8 years, 11 months ago (2012-01-06 20:07:13 UTC) #6
rlarocque
Done. The latest patch should at least fix the Linux trybots. It might fix the ...
8 years, 11 months ago (2012-01-06 21:25:33 UTC) #7
lipalani1
LGTM from my side. On Richard's answer about aborting the syncer I agree this change ...
8 years, 11 months ago (2012-01-06 23:16:30 UTC) #8
rlarocque
On 2012/01/06 23:16:30, lipalani1 wrote: > LGTM from my side. > > On Richard's answer ...
8 years, 11 months ago (2012-01-07 00:05:18 UTC) #9
rlarocque
> The latest upload should fix the last of the trybot errors. Apparently NO_ERROR > ...
8 years, 11 months ago (2012-01-09 21:33:24 UTC) #10
tim (not reviewing)
lgtm
8 years, 11 months ago (2012-01-09 21:36:06 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/9113024/18001
8 years, 11 months ago (2012-01-09 21:45:21 UTC) #12
commit-bot: I haz the power
8 years, 11 months ago (2012-01-10 00:06:54 UTC) #13
Change committed as 116963

Powered by Google App Engine
This is Rietveld 408576698