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

Unified Diff: chrome/browser/sync/profile_sync_service_harness.cc

Issue 10523003: Refactor following sync commit loop change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another rebase Created 8 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
« no previous file with comments | « no previous file | chrome/browser/sync/sync_ui_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service_harness.cc
diff --git a/chrome/browser/sync/profile_sync_service_harness.cc b/chrome/browser/sync/profile_sync_service_harness.cc
index 3d3892f4a93852cbb1644edb8654986df00b4ebf..5e4c33b9d207e001a99f1dd8747a2de545d5c674 100644
--- a/chrome/browser/sync/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/profile_sync_service_harness.cc
@@ -795,7 +795,8 @@ bool ProfileSyncServiceHarness::IsFullySynced() {
// If we didn't try to commit anything in the previous cycle, there's a
// good chance that we're now fully up to date.
bool is_fully_synced =
- (snap.errors().last_post_commit_result == browser_sync::UNSET)
+ snap.syncer_status().num_successful_commits == 0
+ && snap.errors().commit_result == browser_sync::SYNCER_OK
&& IsDataSyncedImpl(snap);
DVLOG(1) << GetClientInfoString(
@@ -999,6 +1000,9 @@ std::string ProfileSyncServiceHarness::GetClientInfoString(
<< snap.has_more_to_sync()
<< ", has_unsynced_items: "
<< (service()->sync_initialized() ? service()->HasUnsyncedItems() : 0)
+ << ", did_commit: "
+ << (snap.syncer_status().num_successful_commits == 0
+ && snap.errors().commit_result == browser_sync::SYNCER_OK)
<< ", encryption conflicts: "
<< snap.num_encryption_conflicts()
<< ", hierarchy conflicts: "
« no previous file with comments | « no previous file | chrome/browser/sync/sync_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698