Index: components/data_use_measurement/core/data_use_measurement.h |
diff --git a/components/data_use_measurement/core/data_use_measurement.h b/components/data_use_measurement/core/data_use_measurement.h |
index ffd64f71cef36ed29172c5ac84e82fa5440878d6..a0e4298c94e59d77b0f7a9eab46f4cb649f2aa6e 100644 |
--- a/components/data_use_measurement/core/data_use_measurement.h |
+++ b/components/data_use_measurement/core/data_use_measurement.h |
@@ -24,6 +24,7 @@ |
class GURL; |
namespace net { |
+class HttpResponseHeaders; |
class URLRequest; |
} |
@@ -53,6 +54,10 @@ class DataUseMeasurement { |
void OnBeforeRedirect(const net::URLRequest& request, |
const GURL& new_location); |
+ // Called when response headers are received for |request|. |
+ void OnHeadersReceived(net::URLRequest* request, |
+ const net::HttpResponseHeaders* response_headers); |
+ |
// Called when data is received or sent on the network, respectively. |
void OnNetworkBytesReceived(const net::URLRequest& request, |
int64_t bytes_received); |
@@ -137,6 +142,15 @@ class DataUseMeasurement { |
bool is_tab_visible, |
int64_t bytes); |
+ // Records data use histograms of user traffic and services traffic split on |
+ // content type, AppState and TabState. |
+ void RecordContentTypeHistogram( |
+ DataUseUserData::DataUseContentType content_type, |
+ bool is_user_traffic, |
+ DataUseUserData::AppState app_state, |
+ bool is_tab_visible, |
+ int64_t bytes); |
+ |
// Classifier for identifying if an URL request is user initiated. |
std::unique_ptr<URLRequestClassifier> url_request_classifier_; |