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

Unified Diff: components/domain_reliability/context.h

Issue 2466093002: Domain Reliability: Add more upload-related histograms. (Closed)
Patch Set: A couple of tweaks. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/domain_reliability/context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/domain_reliability/context.h
diff --git a/components/domain_reliability/context.h b/components/domain_reliability/context.h
index 34ef4bf9d2bdf6806773b0ee3bedc04dba7e823f..41c35a5f02a153e78277f73ad470c391b21c1fb3 100644
--- a/components/domain_reliability/context.h
+++ b/components/domain_reliability/context.h
@@ -61,7 +61,10 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityContext {
// Notifies the context of a beacon on its domain(s); may or may not save the
// actual beacon to be uploaded, depending on the sample rates in the config,
// but will increment one of the request counters in any case.
- void OnBeacon(std::unique_ptr<DomainReliabilityBeacon> beacon);
+ //
+ // Returns |true| if the beacon was queued or |false| if it was discarded,
+ // for metrics purposes.
+ bool OnBeacon(std::unique_ptr<DomainReliabilityBeacon> beacon);
// Called to clear browsing data, since beacons are like browsing history.
void ClearBeacons();
@@ -122,6 +125,8 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityContext {
// pointer to that value in a wider (e.g. per-Monitor or unittest) scope.
const base::TimeTicks* last_network_change_time_;
+ base::TimeTicks last_queued_beacon_time_;
+
base::WeakPtrFactory<DomainReliabilityContext> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(DomainReliabilityContext);
« no previous file with comments | « no previous file | components/domain_reliability/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698