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

Issue 391343002: Keep sync tasks alive as long as it's not finished (Closed)

Created:
6 years, 5 months ago by hashimoto
Modified:
6 years, 5 months ago
Reviewers:
kinaba
CC:
chromium-reviews, tim+watch_chromium.org, nkostylev+watch_chromium.org, zea+watch_chromium.org, tfarina, haitaol+watch_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, maniscalco+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Keep sync tasks alive as long as it's not finished After this change, sync tasks are erased only when it completes or SyncClient gives up. This change is preparation for implementing a mechanism to allow CopyOperation to wait for a specific sync task to complete. In EntryUpdatePerformer: Add a new error code FILE_ERROR_PARENT_NEEDS_TO_BE_SYNCED. Return the new error code when the sync task cannot be completed because of the lack of the parent resource ID. In SyncClient: Add a new task state SUSPENDED to allow tasks to be in an inactive state. Add a new member |context| to SyncTask to make it possible to change the context without erasing the task. OnTaskComplete() takes almost all responsibilities to handle errors. OnFetchFileComplete() and OnUpdateCompleter() are now almost empty or removed. Handle the new error code FILE_ERROR_PARENT_NEEDS_TO_BE_SYNCED in OnTaskComplete(). BUG=384213 TEST=unit_tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284051

Patch Set 1 : #

Total comments: 3

Patch Set 2 : rebase #

Patch Set 3 : Return the parent's ID from EntryUpdatePerformer #

Patch Set 4 : Check in SyncClient #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -146 lines) Patch
M chrome/browser/chromeos/drive/sync_client.h View 1 2 3 5 chunks +25 lines, -13 lines 0 comments Download
M chrome/browser/chromeos/drive/sync_client.cc View 1 2 3 7 chunks +151 lines, -132 lines 0 comments Download
M chrome/browser/chromeos/drive/sync_client_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
hashimoto
https://codereview.chromium.org/391343002/diff/80001/chrome/browser/chromeos/drive/sync_client_unittest.cc File chrome/browser/chromeos/drive/sync_client_unittest.cc (right): https://codereview.chromium.org/391343002/diff/80001/chrome/browser/chromeos/drive/sync_client_unittest.cc#newcode480 chrome/browser/chromeos/drive/sync_client_unittest.cc:480: sync_client_->AddUpdateTask(ClientContext(USER_INITIATED), local_id2); In the new code, RunUntilIdle() is not ...
6 years, 5 months ago (2014-07-16 11:05:16 UTC) #1
kinaba
https://codereview.chromium.org/391343002/diff/80001/chrome/browser/chromeos/drive/sync_client.cc File chrome/browser/chromeos/drive/sync_client.cc (right): https://codereview.chromium.org/391343002/diff/80001/chrome/browser/chromeos/drive/sync_client.cc#newcode453 chrome/browser/chromeos/drive/sync_client.cc:453: if (it_parent == tasks_.end()) { Can't there be a ...
6 years, 5 months ago (2014-07-17 06:07:48 UTC) #2
hashimoto
https://codereview.chromium.org/391343002/diff/80001/chrome/browser/chromeos/drive/sync_client.cc File chrome/browser/chromeos/drive/sync_client.cc (right): https://codereview.chromium.org/391343002/diff/80001/chrome/browser/chromeos/drive/sync_client.cc#newcode453 chrome/browser/chromeos/drive/sync_client.cc:453: if (it_parent == tasks_.end()) { On 2014/07/17 06:07:46, kinaba ...
6 years, 5 months ago (2014-07-18 06:12:17 UTC) #3
hashimoto
A new patch set which performs the parent resource ID check in SyncClient. PTAL
6 years, 5 months ago (2014-07-18 08:16:59 UTC) #4
kinaba
lgtm. thanks!
6 years, 5 months ago (2014-07-18 08:25:20 UTC) #5
hashimoto
The CQ bit was checked by hashimoto@chromium.org
6 years, 5 months ago (2014-07-18 08:34:00 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hashimoto@chromium.org/391343002/240001
6 years, 5 months ago (2014-07-18 08:34:53 UTC) #7
commit-bot: I haz the power
6 years, 5 months ago (2014-07-18 10:43:18 UTC) #8
Message was sent while issue was closed.
Change committed as 284051

Powered by Google App Engine
This is Rietveld 408576698