OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/metrics/metrics_reporting_scheduler.h" | 5 #include "components/metrics/metrics_reporting_scheduler.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 | 9 |
10 using base::TimeDelta; | 10 using base::TimeDelta; |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 // The delay, in seconds, after startup before sending the first log message. | 14 // The delay, in seconds, after startup before sending the first log message. |
15 #if defined(OS_ANDROID) || defined(OS_IOS) | 15 #if defined(OS_ANDROID) || defined(OS_IOS) |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 upload_interval_ = TimeDelta::FromMicroseconds( | 151 upload_interval_ = TimeDelta::FromMicroseconds( |
152 static_cast<int64>(kBackoffMultiplier * | 152 static_cast<int64>(kBackoffMultiplier * |
153 upload_interval_.InMicroseconds())); | 153 upload_interval_.InMicroseconds())); |
154 | 154 |
155 TimeDelta max_interval = kMaxBackoffMultiplier * | 155 TimeDelta max_interval = kMaxBackoffMultiplier * |
156 TimeDelta::FromSeconds(kStandardUploadIntervalSeconds); | 156 TimeDelta::FromSeconds(kStandardUploadIntervalSeconds); |
157 if (upload_interval_ > max_interval || upload_interval_.InSeconds() < 0) { | 157 if (upload_interval_ > max_interval || upload_interval_.InSeconds() < 0) { |
158 upload_interval_ = max_interval; | 158 upload_interval_ = max_interval; |
159 } | 159 } |
160 } | 160 } |
OLD | NEW |