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

Unified Diff: components/data_use_measurement/content/data_use_measurement.h

Issue 2061303003: Precache should cancel when there is user traffic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: components/data_use_measurement/content/data_use_measurement.h
diff --git a/components/data_use_measurement/content/data_use_measurement.h b/components/data_use_measurement/content/data_use_measurement.h
index babaeade50dd03586f36333f8c35b4cd67be902c..55046c76a3511eb65b235d1c3392166b7a5386d8 100644
--- a/components/data_use_measurement/content/data_use_measurement.h
+++ b/components/data_use_measurement/content/data_use_measurement.h
@@ -41,6 +41,9 @@ class DataUseMeasurement {
// Records the data use of the |request|, thus |request| must be non-null.
void ReportDataUseUMA(const net::URLRequest* request) const;
+ // Returns true if the URLRequest |request| is initiated by user traffic.
+ static bool IsUserTraffic(const net::URLRequest* request);
bengr 2016/07/06 17:04:27 A better name for this is probably IsUserInitiated
Raj 2016/07/06 18:28:23 Done.
+
#if defined(OS_ANDROID)
// This function should just be used for testing purposes. A change in
// application state can be simulated by calling this function.

Powered by Google App Engine
This is Rietveld 408576698