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

Side by Side Diff: components/metrics/metrics_reporting_scheduler.cc

Issue 294693002: Moved metrics_reporting_scheduler* to //components/metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Hopefully synced this time. Created 6 years, 7 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
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « components/metrics/metrics_reporting_scheduler.h ('k') | components/metrics/metrics_reporting_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698