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

Side by Side Diff: components/domain_reliability/scheduler.cc

Issue 371113002: Fixes for re-enabling more MSVC level 4 warnings: components/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix compile failure Created 6 years, 5 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_form_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/domain_reliability/scheduler.h" 5 #include "components/domain_reliability/scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "components/domain_reliability/config.h" 11 #include "components/domain_reliability/config.h"
12 #include "components/domain_reliability/util.h" 12 #include "components/domain_reliability/util.h"
13 13
14 namespace { 14 namespace {
15 15
16 const unsigned kInvalidCollectorIndex = -1; 16 const unsigned kInvalidCollectorIndex = static_cast<unsigned>(-1);
17 17
18 const unsigned kDefaultMinimumUploadDelaySec = 60; 18 const unsigned kDefaultMinimumUploadDelaySec = 60;
19 const unsigned kDefaultMaximumUploadDelaySec = 300; 19 const unsigned kDefaultMaximumUploadDelaySec = 300;
20 const unsigned kDefaultUploadRetryIntervalSec = 60; 20 const unsigned kDefaultUploadRetryIntervalSec = 60;
21 21
22 const char* kMinimumUploadDelayFieldTrialName = "DomRel-MinimumUploadDelay"; 22 const char* kMinimumUploadDelayFieldTrialName = "DomRel-MinimumUploadDelay";
23 const char* kMaximumUploadDelayFieldTrialName = "DomRel-MaximumUploadDelay"; 23 const char* kMaximumUploadDelayFieldTrialName = "DomRel-MaximumUploadDelay";
24 const char* kUploadRetryIntervalFieldTrialName = "DomRel-UploadRetryInterval"; 24 const char* kUploadRetryIntervalFieldTrialName = "DomRel-UploadRetryInterval";
25 25
26 unsigned GetUnsignedFieldTrialValueOrDefault(std::string field_trial_name, 26 unsigned GetUnsignedFieldTrialValueOrDefault(std::string field_trial_name,
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 return base::TimeDelta::FromSeconds(0); 203 return base::TimeDelta::FromSeconds(0);
204 else { 204 else {
205 // Don't back off more than 64x the original delay. 205 // Don't back off more than 64x the original delay.
206 if (failures > 7) 206 if (failures > 7)
207 failures = 7; 207 failures = 7;
208 return params_.upload_retry_interval * (1 << (failures - 1)); 208 return params_.upload_retry_interval * (1 << (failures - 1));
209 } 209 }
210 } 210 }
211 211
212 } // namespace domain_reliability 212 } // namespace domain_reliability
OLDNEW
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_form_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698