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

Unified Diff: sync/sessions/test_util.cc

Issue 133763007: [Recommit] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « sync/sessions/test_util.h ('k') | sync/test/engine/fake_sync_scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/test_util.cc
diff --git a/sync/sessions/test_util.cc b/sync/sessions/test_util.cc
index 538ed0f88c042490e7f4e8353189781f125cce07..951db8d1dbe3200d7e7d1754aba7af847e84f15b 100644
--- a/sync/sessions/test_util.cc
+++ b/sync/sessions/test_util.cc
@@ -81,15 +81,15 @@ void SimulateConnectionFailure(
NETWORK_CONNECTION_UNAVAILABLE);
}
-void SimulatePollSuccess(ModelTypeSet requested_types,
- sessions::SyncSession* session) {
+void SimulatePollRetrySuccess(ModelTypeSet requested_types,
+ sessions::SyncSession* session) {
ASSERT_EQ(0U, session->status_controller().num_server_changes_remaining());
session->mutable_status_controller()->set_last_download_updates_result(
SYNCER_OK);
}
-void SimulatePollFailed(ModelTypeSet requested_types,
- sessions::SyncSession* session) {
+void SimulatePollRetryFailed(ModelTypeSet requested_types,
+ sessions::SyncSession* session) {
ASSERT_EQ(0U, session->status_controller().num_server_changes_remaining());
session->mutable_status_controller()->set_last_download_updates_result(
SERVER_RETURN_TRANSIENT_ERROR);
@@ -116,7 +116,7 @@ void SimulatePollIntervalUpdateImpl(
ModelTypeSet requested_types,
sessions::SyncSession* session,
const base::TimeDelta& new_poll) {
- SimulatePollSuccess(requested_types, session);
+ SimulatePollRetrySuccess(requested_types, session);
session->delegate()->OnReceivedLongPollIntervalUpdate(new_poll);
}
@@ -129,6 +129,13 @@ void SimulateSessionsCommitDelayUpdateImpl(
session->delegate()->OnReceivedSessionsCommitDelay(new_delay);
}
+void SimulateGuRetryDelayCommandImpl(sessions::SyncSession* session,
+ base::TimeDelta delay) {
+ session->mutable_status_controller()->set_last_download_updates_result(
+ SYNCER_OK);
+ session->delegate()->OnReceivedGuRetryDelay(delay);
+}
+
} // namespace test_util
} // namespace sessions
} // namespace syncer
« no previous file with comments | « sync/sessions/test_util.h ('k') | sync/test/engine/fake_sync_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698