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

Unified Diff: content/public/browser/background_sync_parameters.cc

Issue 1536023002: [BackgroundSync] Add max sync event duration to BackgroundSyncParameters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sync_time2
Patch Set: Rename a constant to match the others Created 5 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 | « content/public/browser/background_sync_parameters.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/background_sync_parameters.cc
diff --git a/content/public/browser/background_sync_parameters.cc b/content/public/browser/background_sync_parameters.cc
index 4cce070cf7206e67c0610de12b53218af3673f02..89d1021af76849ce7a7960edf37d1d8ce7115025 100644
--- a/content/public/browser/background_sync_parameters.cc
+++ b/content/public/browser/background_sync_parameters.cc
@@ -8,18 +8,20 @@ namespace content {
namespace {
const int kMaxSyncAttempts = 3;
-const int kInitialRetryDelayMins = 5;
const int kRetryDelayFactor = 3;
-const int64_t kMinSyncRecoveryTimeMs = 1000 * 60 * 6; // 6 minutes
+const int kInitialRetryDelaySec = 60 * 5; // 5 minutes
+const int kMaxSyncEventSec = 60 * 3; // 3 minutes
+const int64_t kMinSyncRecoveryTimeSec = 60 * 6; // 6 minutes
}
BackgroundSyncParameters::BackgroundSyncParameters()
: disable(false),
max_sync_attempts(kMaxSyncAttempts),
- initial_retry_delay(base::TimeDelta::FromMinutes(kInitialRetryDelayMins)),
+ initial_retry_delay(base::TimeDelta::FromSeconds(kInitialRetryDelaySec)),
retry_delay_factor(kRetryDelayFactor),
min_sync_recovery_time(
- base::TimeDelta::FromMilliseconds(kMinSyncRecoveryTimeMs)) {}
+ base::TimeDelta::FromSeconds(kMinSyncRecoveryTimeSec)),
+ max_sync_event_duration(base::TimeDelta::FromSeconds(kMaxSyncEventSec)) {}
bool BackgroundSyncParameters::operator==(
const BackgroundSyncParameters& other) const {
@@ -27,7 +29,8 @@ bool BackgroundSyncParameters::operator==(
max_sync_attempts == other.max_sync_attempts &&
initial_retry_delay == other.initial_retry_delay &&
retry_delay_factor == other.retry_delay_factor &&
- min_sync_recovery_time == other.min_sync_recovery_time;
+ min_sync_recovery_time == other.min_sync_recovery_time &&
+ max_sync_event_duration == other.max_sync_event_duration;
}
} // namespace content
« no previous file with comments | « content/public/browser/background_sync_parameters.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698