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

Unified Diff: chrome/browser/background_sync/background_sync_controller_impl.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: 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
Index: chrome/browser/background_sync/background_sync_controller_impl.cc
diff --git a/chrome/browser/background_sync/background_sync_controller_impl.cc b/chrome/browser/background_sync/background_sync_controller_impl.cc
index 0a4740ff2280a17bf879d1bcbbc9b08bc3bad16a..5a7bc21b8d033430f91b390cd120548ffca769e2 100644
--- a/chrome/browser/background_sync/background_sync_controller_impl.cc
+++ b/chrome/browser/background_sync/background_sync_controller_impl.cc
@@ -28,6 +28,8 @@ const char BackgroundSyncControllerImpl::kRetryDelayFactorParameterName[] =
"retry_delay_factor";
const char BackgroundSyncControllerImpl::kMinSyncRecoveryTimeName[] =
"min_recovery_time_ms";
+const char BackgroundSyncControllerImpl::kMaxSyncEventDuration[] =
+ "max_sync_event_duration_sec";
BackgroundSyncControllerImpl::BackgroundSyncControllerImpl(Profile* profile)
: profile_(profile) {}
@@ -81,6 +83,15 @@ void BackgroundSyncControllerImpl::GetParameterOverrides(
}
}
+ if (ContainsKey(field_params, kMaxSyncEventDuration)) {
+ int64_t max_sync_event_duration_sec;
+ if (base::StringToInt64(field_params[kMaxSyncEventDuration],
iclelland 2015/12/21 19:50:15 I think this should be StringToInt (and `int max_s
jkarlin 2015/12/28 15:51:29 Done.
+ &max_sync_event_duration_sec)) {
+ parameters->max_sync_event_duration =
+ base::TimeDelta::FromSeconds(max_sync_event_duration_sec);
+ }
+ }
+
return;
}

Powered by Google App Engine
This is Rietveld 408576698