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

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

Issue 1871733002: Add histograms for observing UMA throttling effect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // The MetricsService method to call when uploading should happen. 64 // The MetricsService method to call when uploading should happen.
65 const base::Closure upload_callback_; 65 const base::Closure upload_callback_;
66 66
67 base::OneShotTimer upload_timer_; 67 base::OneShotTimer upload_timer_;
68 68
69 // The interval between being told an upload is done and starting the next 69 // The interval between being told an upload is done and starting the next
70 // upload. 70 // upload.
71 base::TimeDelta upload_interval_; 71 base::TimeDelta upload_interval_;
72 72
73 // The tick count of the last time log upload has been finished and null if no
74 // upload has been done yet.
75 base::TimeTicks last_upload_finish_time_;
76
77 // 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
78 // more recently than Stop). 74 // more recently than Stop).
79 bool running_; 75 bool running_;
80 76
81 // Indicates that the last triggered upload hasn't resolved yet. 77 // Indicates that the last triggered upload hasn't resolved yet.
82 bool callback_pending_; 78 bool callback_pending_;
83 79
84 // Whether the InitTaskComplete() callback has been called. 80 // Whether the InitTaskComplete() callback has been called.
85 bool init_task_complete_; 81 bool init_task_complete_;
86 82
87 // 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
88 // has been completed. 84 // has been completed.
89 bool waiting_for_init_task_complete_; 85 bool waiting_for_init_task_complete_;
90 86
91 // Callback function used to get the standard upload time. 87 // Callback function used to get the standard upload time.
92 base::Callback<base::TimeDelta(void)> upload_interval_callback_; 88 base::Callback<base::TimeDelta(void)> upload_interval_callback_;
93 89
94 DISALLOW_COPY_AND_ASSIGN(MetricsReportingScheduler); 90 DISALLOW_COPY_AND_ASSIGN(MetricsReportingScheduler);
95 }; 91 };
96 92
97 } // namespace metrics 93 } // namespace metrics
98 94
99 #endif // COMPONENTS_METRICS_METRICS_REPORTING_SCHEDULER_H_ 95 #endif // COMPONENTS_METRICS_METRICS_REPORTING_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | components/metrics/metrics_reporting_scheduler.cc » ('j') | components/metrics/metrics_reporting_scheduler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698