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

Side by Side Diff: content/public/browser/background_sync_parameters.cc

Issue 1539913002: [BackgroundSync] Change the default number of sync attempts to 3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/browser/background_sync_parameters.h" 5 #include "content/public/browser/background_sync_parameters.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 namespace { 9 namespace {
10 const int kMaxSyncAttempts = 5; 10 const int kMaxSyncAttempts = 3;
11 const int kInitialRetryDelayMins = 5; 11 const int kInitialRetryDelayMins = 5;
12 const int kRetryDelayFactor = 3; 12 const int kRetryDelayFactor = 3;
13 const int64_t kMinSyncRecoveryTimeMs = 1000 * 60 * 6; // 6 minutes 13 const int64_t kMinSyncRecoveryTimeMs = 1000 * 60 * 6; // 6 minutes
14 } 14 }
15 15
16 BackgroundSyncParameters::BackgroundSyncParameters() 16 BackgroundSyncParameters::BackgroundSyncParameters()
17 : disable(false), 17 : disable(false),
18 max_sync_attempts(kMaxSyncAttempts), 18 max_sync_attempts(kMaxSyncAttempts),
19 initial_retry_delay(base::TimeDelta::FromMinutes(kInitialRetryDelayMins)), 19 initial_retry_delay(base::TimeDelta::FromMinutes(kInitialRetryDelayMins)),
20 retry_delay_factor(kRetryDelayFactor), 20 retry_delay_factor(kRetryDelayFactor),
21 min_sync_recovery_time( 21 min_sync_recovery_time(
22 base::TimeDelta::FromMilliseconds(kMinSyncRecoveryTimeMs)) {} 22 base::TimeDelta::FromMilliseconds(kMinSyncRecoveryTimeMs)) {}
23 23
24 bool BackgroundSyncParameters::operator==( 24 bool BackgroundSyncParameters::operator==(
25 const BackgroundSyncParameters& other) const { 25 const BackgroundSyncParameters& other) const {
26 return disable == other.disable && 26 return disable == other.disable &&
27 max_sync_attempts == other.max_sync_attempts && 27 max_sync_attempts == other.max_sync_attempts &&
28 initial_retry_delay == other.initial_retry_delay && 28 initial_retry_delay == other.initial_retry_delay &&
29 retry_delay_factor == other.retry_delay_factor && 29 retry_delay_factor == other.retry_delay_factor &&
30 min_sync_recovery_time == other.min_sync_recovery_time; 30 min_sync_recovery_time == other.min_sync_recovery_time;
31 } 31 }
32 32
33 } // namespace content 33 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698