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

Unified Diff: chrome/browser/sync_file_system/sync_process_runner.cc

Issue 119793002: SyncFS: Fix when to call OnSyncIdle() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/sync_process_runner.cc
diff --git a/chrome/browser/sync_file_system/sync_process_runner.cc b/chrome/browser/sync_file_system/sync_process_runner.cc
index e746ec588e0d0d90dad9a967026bbd5740dd8e13..2f42d790d64254291a70ee8a7fb4d2a271a662c1 100644
--- a/chrome/browser/sync_file_system/sync_process_runner.cc
+++ b/chrome/browser/sync_file_system/sync_process_runner.cc
@@ -93,14 +93,15 @@ void SyncProcessRunner::ScheduleIfNotRunning() {
void SyncProcessRunner::OnChangesUpdated(
int64 pending_changes) {
DCHECK_GE(pending_changes, 0);
- if (pending_changes_ != pending_changes) {
+ int64 old_pending_changes = pending_changes_;
+ pending_changes_ = pending_changes;
+ if (old_pending_changes != pending_changes) {
if (pending_changes == 0)
sync_service()->OnSyncIdle();
util::Log(logging::LOG_VERBOSE, FROM_HERE,
"[%s] pending_changes updated: %" PRId64,
name_.c_str(), pending_changes);
}
- pending_changes_ = pending_changes;
Schedule();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698