Index: components/data_use_measurement/core/data_use_user_data.h |
diff --git a/components/data_use_measurement/core/data_use_user_data.h b/components/data_use_measurement/core/data_use_user_data.h |
index cfae6b9b75c9c6c3e21d295005915ddb3064d387..1b7c3c364f59a7cd82b495e997a7a08977f21b10 100644 |
--- a/components/data_use_measurement/core/data_use_user_data.h |
+++ b/components/data_use_measurement/core/data_use_user_data.h |
@@ -52,6 +52,19 @@ class DataUseUserData : public base::SupportsUserData::Data { |
UPDATE_CLIENT, |
}; |
+ // Content type of the URL request. |
+ enum ContentType { |
+ MAIN_FRAME_HTML, |
+ NON_MAIN_FRAME_HTML, |
+ CSS, |
+ IMAGE, |
+ JAVASCRIPT, |
+ FONT, |
+ AUDIO, |
+ VIDEO, |
+ OTHER, |
+ }; |
+ |
// The state of the application. Only available on Android and on other |
// platforms it is always FOREGROUND. |
enum AppState { UNKNOWN, BACKGROUND, FOREGROUND }; |
@@ -78,6 +91,12 @@ class DataUseUserData : public base::SupportsUserData::Data { |
void set_app_state(AppState app_state) { app_state_ = app_state; } |
+ ContentType content_type() { return content_type_; } |
+ |
+ void set_content_type(ContentType content_type) { |
+ content_type_ = content_type; |
+ } |
+ |
// The key for retrieving back this type of user data. |
static const void* const kUserDataKey; |
@@ -87,6 +106,8 @@ class DataUseUserData : public base::SupportsUserData::Data { |
// App state when network access was performed for the request previously. |
AppState app_state_; |
+ ContentType content_type_; |
+ |
DISALLOW_COPY_AND_ASSIGN(DataUseUserData); |
}; |