OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_DATA_USE_MEASUREMENT_H_ | 5 #ifndef COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_DATA_USE_MEASUREMENT_H_ |
6 #define COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_DATA_USE_MEASUREMENT_H_ | 6 #define COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_DATA_USE_MEASUREMENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 TrafficDirection dir, | 133 TrafficDirection dir, |
134 DataUseUserData::AppState app_state, | 134 DataUseUserData::AppState app_state, |
135 bool is_connection_cellular, | 135 bool is_connection_cellular, |
136 int64_t message_size) const; | 136 int64_t message_size) const; |
137 | 137 |
138 // Records data use histograms split on TrafficDirection, AppState and | 138 // Records data use histograms split on TrafficDirection, AppState and |
139 // TabState. | 139 // TabState. |
140 void RecordTabStateHistogram(TrafficDirection dir, | 140 void RecordTabStateHistogram(TrafficDirection dir, |
141 DataUseUserData::AppState app_state, | 141 DataUseUserData::AppState app_state, |
142 bool is_tab_visible, | 142 bool is_tab_visible, |
143 int64_t bytes); | 143 int64_t bytes) const; |
| 144 |
| 145 // Records data use histograms split on page tranition. |
| 146 void RecordPageTransitionUMA(const net::URLRequest& request) const; |
144 | 147 |
145 // Records data use histograms of user traffic and services traffic split on | 148 // Records data use histograms of user traffic and services traffic split on |
146 // content type, AppState and TabState. | 149 // content type, AppState and TabState. |
147 void RecordContentTypeHistogram( | 150 void RecordContentTypeHistogram( |
148 DataUseUserData::DataUseContentType content_type, | 151 DataUseUserData::DataUseContentType content_type, |
149 bool is_user_traffic, | 152 bool is_user_traffic, |
150 DataUseUserData::AppState app_state, | 153 DataUseUserData::AppState app_state, |
151 bool is_tab_visible, | 154 bool is_tab_visible, |
152 int64_t bytes); | 155 int64_t bytes); |
153 | 156 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // True if app is in background and first network read has not yet happened. | 193 // True if app is in background and first network read has not yet happened. |
191 bool no_reads_since_background_; | 194 bool no_reads_since_background_; |
192 #endif | 195 #endif |
193 | 196 |
194 DISALLOW_COPY_AND_ASSIGN(DataUseMeasurement); | 197 DISALLOW_COPY_AND_ASSIGN(DataUseMeasurement); |
195 }; | 198 }; |
196 | 199 |
197 } // namespace data_use_measurement | 200 } // namespace data_use_measurement |
198 | 201 |
199 #endif // COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_DATA_USE_MEASUREMENT_H_ | 202 #endif // COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_DATA_USE_MEASUREMENT_H_ |
OLD | NEW |