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

Side by Side Diff: components/domain_reliability/scheduler.h

Issue 1180223006: Domain Reliability: Simplify configs and reports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make requested changes Created 5 years, 1 month 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_DOMAIN_RELIABILITY_SCHEDULER_H_ 5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_SCHEDULER_H_
6 #define COMPONENTS_DOMAIN_RELIABILITY_SCHEDULER_H_ 6 #define COMPONENTS_DOMAIN_RELIABILITY_SCHEDULER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/scoped_vector.h" 11 #include "base/memory/scoped_vector.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "components/domain_reliability/domain_reliability_export.h" 13 #include "components/domain_reliability/domain_reliability_export.h"
14 #include "components/domain_reliability/uploader.h" 14 #include "components/domain_reliability/uploader.h"
15 #include "net/base/backoff_entry.h" 15 #include "net/base/backoff_entry.h"
16 16
17 namespace base { 17 namespace base {
18 class Value; 18 class Value;
19 } // namespace base 19 } // namespace base
20 20
21 namespace domain_reliability { 21 namespace domain_reliability {
22 22
23 class DomainReliabilityConfig; 23 struct DomainReliabilityConfig;
24 class MockableTime; 24 class MockableTime;
25 25
26 // Determines when an upload should be scheduled. A domain's config will 26 // Determines when an upload should be scheduled. A domain's config will
27 // specify minimum and maximum upload delays; the minimum upload delay ensures 27 // specify minimum and maximum upload delays; the minimum upload delay ensures
28 // that Chrome will not send too many upload requests to a site by waiting at 28 // that Chrome will not send too many upload requests to a site by waiting at
29 // least that long after the first beacon, while the maximum upload delay makes 29 // least that long after the first beacon, while the maximum upload delay makes
30 // sure the server receives the reports while they are still fresh. 30 // sure the server receives the reports while they are still fresh.
31 // 31 //
32 // When everything is working fine, the scheduler will return precisely that 32 // When everything is working fine, the scheduler will return precisely that
33 // interval. If all uploaders have failed, then the beginning or ending points 33 // interval. If all uploaders have failed, then the beginning or ending points
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 bool last_upload_finished_; 137 bool last_upload_finished_;
138 base::TimeTicks last_upload_start_time_; 138 base::TimeTicks last_upload_start_time_;
139 base::TimeTicks last_upload_end_time_; 139 base::TimeTicks last_upload_end_time_;
140 size_t last_upload_collector_index_; 140 size_t last_upload_collector_index_;
141 bool last_upload_success_; 141 bool last_upload_success_;
142 }; 142 };
143 143
144 } // namespace domain_reliability 144 } // namespace domain_reliability
145 145
146 #endif // COMPONENTS_DOMAIN_RELIABILITY_SCHEDULER_H_ 146 #endif // COMPONENTS_DOMAIN_RELIABILITY_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698