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

Unified Diff: chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc

Issue 302003013: [SyncFS] Run V2 backend tasks as SyncTask (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc b/chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc
index e25e9339a6ae54a95f3cd0f52825d71242a125e1..077f13262f71b1cb571f96befa5722d1ce9b51d3 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc
@@ -208,8 +208,12 @@ void SyncTaskManager::NotifyTaskDoneBody(scoped_ptr<SyncTaskToken> token,
token->clear_blocking_factor();
}
- if (client_)
- client_->RecordTaskLog(token->PassTaskLog());
+ if (client_) {
+ if (token->has_task_log()) {
+ token->FinalizeTaskLog(SyncStatusCodeToString(status));
+ client_->RecordTaskLog(token->PassTaskLog());
+ }
+ }
scoped_ptr<SyncTask> task;
SyncStatusCallback callback = token->callback();
@@ -246,6 +250,7 @@ void SyncTaskManager::UpdateBlockingFactorBody(
if (!maximum_background_task_) {
DCHECK(foreground_task_token);
DCHECK(!background_task_token);
+ foreground_task_token->SetTaskLog(task_log.Pass());
continuation.Run(foreground_task_token.Pass());
return;
}

Powered by Google App Engine
This is Rietveld 408576698