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

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

Issue 7861013: Fix the false-positive detection of commit errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another attempt at detecting errors Created 9 years, 2 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 | « chrome/browser/sync/sessions/sync_session.cc ('k') | 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/sessions/test_util.cc
diff --git a/chrome/browser/sync/sessions/test_util.cc b/chrome/browser/sync/sessions/test_util.cc
index 65d307b7387adddf3251381faa0c0a43a029787d..8353392307ace6ca28491db68bbc57673b3a4150 100644
--- a/chrome/browser/sync/sessions/test_util.cc
+++ b/chrome/browser/sync/sessions/test_util.cc
@@ -16,21 +16,16 @@ 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->status_controller()->set_num_server_changes_remaining(1);
+ SyncOperationResult result;
+ result.error_type = TRANSIENT_ERROR;
+ session->status_controller()->set_last_download_updates_result(result);
}
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->status_controller()->set_unsynced_handles(handles);
+ SyncOperationResult result;
+ result.error_type = TRANSIENT_ERROR;
+ session->status_controller()->set_last_post_commit_result(result);
}
void SimulateSuccess(sessions::SyncSession* session,
« no previous file with comments | « chrome/browser/sync/sessions/sync_session.cc ('k') | chrome/browser/sync/sync_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698