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

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

Issue 633373011: Histogram for recording actual log upload interval added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: space fix Created 6 years, 2 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 | « no previous file | 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"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 // The MetricsService method to call when uploading should happen. 60 // The MetricsService method to call when uploading should happen.
61 const base::Closure upload_callback_; 61 const base::Closure upload_callback_;
62 62
63 base::OneShotTimer<MetricsReportingScheduler> upload_timer_; 63 base::OneShotTimer<MetricsReportingScheduler> upload_timer_;
64 64
65 // The interval between being told an upload is done and starting the next 65 // The interval between being told an upload is done and starting the next
66 // upload. 66 // upload.
67 base::TimeDelta upload_interval_; 67 base::TimeDelta upload_interval_;
68 68
69 // The tick count of the last time log upload has been finished and null if no
70 // upload has been done yet.
71 base::TimeTicks last_upload_finish_time_;
72
69 // Indicates that the scheduler is running (i.e., that Start has been called 73 // Indicates that the scheduler is running (i.e., that Start has been called
70 // more recently than Stop). 74 // more recently than Stop).
71 bool running_; 75 bool running_;
72 76
73 // Indicates that the last triggered upload hasn't resolved yet. 77 // Indicates that the last triggered upload hasn't resolved yet.
74 bool callback_pending_; 78 bool callback_pending_;
75 79
76 // Whether the InitTaskComplete() callback has been called. 80 // Whether the InitTaskComplete() callback has been called.
77 bool init_task_complete_; 81 bool init_task_complete_;
78 82
79 // Whether the initial scheduled upload timer has fired before the init task 83 // Whether the initial scheduled upload timer has fired before the init task
80 // has been completed. 84 // has been completed.
81 bool waiting_for_init_task_complete_; 85 bool waiting_for_init_task_complete_;
82 86
83 DISALLOW_COPY_AND_ASSIGN(MetricsReportingScheduler); 87 DISALLOW_COPY_AND_ASSIGN(MetricsReportingScheduler);
84 }; 88 };
85 89
86 } // namespace metrics 90 } // namespace metrics
87 91
88 #endif // COMPONENTS_METRICS_METRICS_REPORTING_SCHEDULER_H_ 92 #endif // COMPONENTS_METRICS_METRICS_REPORTING_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | components/metrics/metrics_reporting_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698