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

Unified Diff: chrome/browser/sync/sessions/test_util.cc

Issue 9036003: Avoid useless SYNC_CYCLE_CONTINUATION sync cycle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | « chrome/browser/sync/sessions/sync_session.cc ('k') | chrome/browser/sync/test/engine/fake_model_worker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/sessions/test_util.cc
diff --git a/chrome/browser/sync/sessions/test_util.cc b/chrome/browser/sync/sessions/test_util.cc
index 7c0eca938a1b98b708a09517cbd2f62059802633..dd6724d089caa3293646fcecaafaba3f7fed97b3 100644
--- a/chrome/browser/sync/sessions/test_util.cc
+++ b/chrome/browser/sync/sessions/test_util.cc
@@ -16,21 +16,14 @@ void SimulateHasMoreToSync(sessions::SyncSession* session,
void SimulateDownloadUpdatesFailed(sessions::SyncSession* session,
SyncerStep begin, SyncerStep end) {
- // Note that a non-zero value of changes_remaining once a session has
- // completed implies that the Syncer was unable to exhaust this count during
- // the GetUpdates cycle. This is an indication that an error occurred.
- session->mutable_status_controller()->set_num_server_changes_remaining(1);
+ session->mutable_status_controller()->set_download_updates_result(
+ SERVER_RETURN_TRANSIENT_ERROR);
}
void SimulateCommitFailed(sessions::SyncSession* session,
SyncerStep begin, SyncerStep end) {
- // Note that a non-zero number of unsynced handles once a session has
- // completed implies that the Syncer was unable to make forward progress
- // during a commit, indicating an error occurred.
- // See implementation of SyncSession::HasMoreToSync.
- std::vector<int64> handles;
- handles.push_back(1);
- session->mutable_status_controller()->set_unsynced_handles(handles);
+ session->mutable_status_controller()->set_post_commit_result(
+ SERVER_RETURN_TRANSIENT_ERROR);
}
void SimulateSuccess(sessions::SyncSession* session,
« no previous file with comments | « chrome/browser/sync/sessions/sync_session.cc ('k') | chrome/browser/sync/test/engine/fake_model_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698