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

Unified Diff: components/data_use_measurement/core/url_request_classifier.h

Issue 2595503002: Record the data use by content type (Closed)
Patch Set: fixed nits Created 4 years 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 | « components/data_use_measurement/core/data_use_user_data.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/data_use_measurement/core/url_request_classifier.h
diff --git a/components/data_use_measurement/core/url_request_classifier.h b/components/data_use_measurement/core/url_request_classifier.h
index 4714a10872e52664d24741ff0d4e6e64be26407a..00dc4108054d5fd723980014da28554971206813 100644
--- a/components/data_use_measurement/core/url_request_classifier.h
+++ b/components/data_use_measurement/core/url_request_classifier.h
@@ -5,7 +5,10 @@
#ifndef COMPONENTS_DATA_USE_MEASUREMENT_CORE_URL_REQUEST_CLASSIFIER_H_
#define COMPONENTS_DATA_USE_MEASUREMENT_CORE_URL_REQUEST_CLASSIFIER_H_
+#include "components/data_use_measurement/core/data_use_user_data.h"
+
namespace net {
+class HttpResponseHeaders;
class URLRequest;
}
@@ -18,6 +21,13 @@ class URLRequestClassifier {
// Returns true if the URLRequest |request| is initiated by user traffic.
virtual bool IsUserRequest(const net::URLRequest& request) const = 0;
+
+ // Returns the content type of the URL request |request| with response headers
+ // |response_headers|. |is_app_foreground| and |is_tab_visible| indicate the
+ // current app and tab visibility state.
+ virtual DataUseUserData::DataUseContentType GetContentType(
+ const net::URLRequest& request,
+ const net::HttpResponseHeaders& response_headers) const = 0;
};
} // namespace data_use_measurement
« no previous file with comments | « components/data_use_measurement/core/data_use_user_data.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698