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

Unified Diff: components/sync/test/engine/mock_connection_manager.h

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
Index: components/sync/test/engine/mock_connection_manager.h
diff --git a/components/sync/test/engine/mock_connection_manager.h b/components/sync/test/engine/mock_connection_manager.h
index af7e4a7bb9804a532f563f26fa0627d42c004aa3..8f98c69a94425f01912957c6e0a481e718aa8f52 100644
--- a/components/sync/test/engine/mock_connection_manager.h
+++ b/components/sync/test/engine/mock_connection_manager.h
@@ -216,7 +216,9 @@ class MockConnectionManager : public ServerConnectionManager {
store_birthday_ = new_birthday;
}
- void set_partial_throttling(bool value) { partialThrottling_ = value; }
+ void set_throttling(bool value) { throttling_ = value; }
+
+ void set_partial_failure(bool value) { partial_failure_ = value; }
// Retrieve the number of GetUpdates requests that the mock server has
// seen since the last time this function was called. Can be used to
@@ -234,8 +236,10 @@ class MockConnectionManager : public ServerConnectionManager {
expected_filter_ = expected_filter;
}
- // Set throttled date types.
- void SetThrottledTypes(ModelTypeSet types) { throttled_type_ = types; }
+ // Set partial failure date types.
+ void SetPartialFailureTypes(ModelTypeSet types) {
+ partial_failure_type_ = types;
+ }
void SetServerReachable();
@@ -375,10 +379,10 @@ class MockConnectionManager : public ServerConnectionManager {
// Protected by |response_code_override_lock_|.
bool throttling_;
- // Whether we are faking a server mandating clients to partial throttle
+ // Whether we are faking a server mandating clients to partial failure
// requests.
// Protected by |response_code_override_lock_|.
- bool partialThrottling_;
+ bool partial_failure_;
base::Lock response_code_override_lock_;
@@ -398,7 +402,7 @@ class MockConnectionManager : public ServerConnectionManager {
ModelTypeSet expected_filter_;
- ModelTypeSet throttled_type_;
+ ModelTypeSet partial_failure_type_;
int num_get_updates_requests_;
« no previous file with comments | « components/sync/test/engine/fake_sync_scheduler.cc ('k') | components/sync/test/engine/mock_connection_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698