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

Unified Diff: components/sync/engine_impl/cycle/test_util.cc

Issue 2475043002: [Sync] Sync client should to exponential backoff when receive partial failure (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « components/sync/engine_impl/cycle/test_util.h ('k') | components/sync/engine_impl/get_updates_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/engine_impl/cycle/test_util.cc
diff --git a/components/sync/engine_impl/cycle/test_util.cc b/components/sync/engine_impl/cycle/test_util.cc
index 347c994918655e586c1234cd583059f2c67337f4..c23c7ce84db2dd288b5a213f73360d13e652b195 100644
--- a/components/sync/engine_impl/cycle/test_util.cc
+++ b/components/sync/engine_impl/cycle/test_util.cc
@@ -97,11 +97,15 @@ void SimulateThrottledImpl(SyncCycle* cycle, const base::TimeDelta& delta) {
void SimulateTypesThrottledImpl(SyncCycle* cycle,
ModelTypeSet types,
const base::TimeDelta& delta) {
- cycle->mutable_status_controller()->set_last_download_updates_result(
- SERVER_RETURN_THROTTLED);
+ cycle->mutable_status_controller()->set_commit_result(SYNCER_OK);
cycle->delegate()->OnTypesThrottled(types, delta);
}
+void SimulatePartialFailureImpl(SyncCycle* cycle, ModelTypeSet types) {
+ cycle->mutable_status_controller()->set_commit_result(SYNCER_OK);
+ cycle->delegate()->OnTypesBackedOff(types);
+}
+
void SimulatePollIntervalUpdateImpl(ModelTypeSet requested_types,
SyncCycle* cycle,
const base::TimeDelta& new_poll) {
« no previous file with comments | « components/sync/engine_impl/cycle/test_util.h ('k') | components/sync/engine_impl/get_updates_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698