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

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

Issue 502173002: Move more metrics classes to metrics namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test compile. Created 6 years, 4 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
« no previous file with comments | « components/metrics/metrics_log.cc ('k') | components/metrics/metrics_reporting_scheduler.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 #ifndef COMPONENTS_METRICS_METRICS_REPORTING_SCHEDULER_H_ 5 #ifndef COMPONENTS_METRICS_METRICS_REPORTING_SCHEDULER_H_
6 #define COMPONENTS_METRICS_METRICS_REPORTING_SCHEDULER_H_ 6 #define COMPONENTS_METRICS_METRICS_REPORTING_SCHEDULER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "base/timer/timer.h" 12 #include "base/timer/timer.h"
13 13
14 namespace metrics {
15
14 // Scheduler task to drive a MetricsService object's uploading. 16 // Scheduler task to drive a MetricsService object's uploading.
15 class MetricsReportingScheduler { 17 class MetricsReportingScheduler {
16 public: 18 public:
17 explicit MetricsReportingScheduler(const base::Closure& upload_callback); 19 explicit MetricsReportingScheduler(const base::Closure& upload_callback);
18 ~MetricsReportingScheduler(); 20 ~MetricsReportingScheduler();
19 21
20 // Starts scheduling uploads. This in a no-op if the scheduler is already 22 // Starts scheduling uploads. This in a no-op if the scheduler is already
21 // running, so it is safe to call more than once. 23 // running, so it is safe to call more than once.
22 void Start(); 24 void Start();
23 25
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Whether the InitTaskComplete() callback has been called. 70 // Whether the InitTaskComplete() callback has been called.
69 bool init_task_complete_; 71 bool init_task_complete_;
70 72
71 // Whether the initial scheduled upload timer has fired before the init task 73 // Whether the initial scheduled upload timer has fired before the init task
72 // has been completed. 74 // has been completed.
73 bool waiting_for_init_task_complete_; 75 bool waiting_for_init_task_complete_;
74 76
75 DISALLOW_COPY_AND_ASSIGN(MetricsReportingScheduler); 77 DISALLOW_COPY_AND_ASSIGN(MetricsReportingScheduler);
76 }; 78 };
77 79
80 } // namespace metrics
81
78 #endif // COMPONENTS_METRICS_METRICS_REPORTING_SCHEDULER_H_ 82 #endif // COMPONENTS_METRICS_METRICS_REPORTING_SCHEDULER_H_
OLDNEW
« no previous file with comments | « components/metrics/metrics_log.cc ('k') | components/metrics/metrics_reporting_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698