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

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

Issue 443793003: [SyncFS] Clear dirty flag on changelist application phase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/list_changes_task.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/list_changes_task.cc b/chrome/browser/sync_file_system/drive_backend/list_changes_task.cc
index 01cb0fbc40e8bf55067a9fcec5bf2e60214ae38a..7732db22551f0317100178567c9900ff19f302e2 100644
--- a/chrome/browser/sync_file_system/drive_backend/list_changes_task.cc
+++ b/chrome/browser/sync_file_system/drive_backend/list_changes_task.cc
@@ -116,6 +116,18 @@ void ListChangesTask::CheckInChangeList(int64 largest_change_id,
metadata_database()->UpdateByChangeList(
largest_change_id,
change_list_.Pass(),
+ base::Bind(&ListChangesTask::DidCheckInChangeList,
+ weak_ptr_factory_.GetWeakPtr(), base::Passed(&token)));
+}
+
+void ListChangesTask::DidCheckInChangeList(scoped_ptr<SyncTaskToken> token,
+ SyncStatusCode status) {
+ if (status != SYNC_STATUS_OK) {
+ SyncTaskManager::NotifyTaskDone(token.Pass(), status);
+ return;
+ }
+
+ metadata_database()->SweepDirtyTrackers(
base::Bind(&SyncTaskManager::NotifyTaskDone, base::Passed(&token)));
}

Powered by Google App Engine
This is Rietveld 408576698