OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_ | 5 #ifndef CHROME_BROWSER_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_ |
6 #define CHROME_BROWSER_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_ | 6 #define CHROME_BROWSER_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 DataUseRecorderEntry CreateNewDataUseRecorder( | 175 DataUseRecorderEntry CreateNewDataUseRecorder( |
176 net::URLRequest* request, | 176 net::URLRequest* request, |
177 DataUse::TrafficType traffic_type); | 177 DataUse::TrafficType traffic_type); |
178 | 178 |
179 bool IsRecorderInPendingNavigationMap(net::URLRequest* request); | 179 bool IsRecorderInPendingNavigationMap(net::URLRequest* request); |
180 | 180 |
181 bool IsRecorderInRenderFrameMap(net::URLRequest* request); | 181 bool IsRecorderInRenderFrameMap(net::URLRequest* request); |
182 | 182 |
183 void AscribeRecorderWithRequest(net::URLRequest* request, | 183 void AscribeRecorderWithRequest(net::URLRequest* request, |
184 DataUseRecorderEntry recorder); | 184 DataUseRecorderEntry entry); |
185 | 185 |
186 // Owner for all instances of DataUseRecorder. An instance is kept in this | 186 // Owner for all instances of DataUseRecorder. An instance is kept in this |
187 // list if any entity (render frame hosts, URLRequests, pending navigations) | 187 // list if any entity (render frame hosts, URLRequests, pending navigations) |
188 // that ascribe data use to the instance exists, and deleted when all | 188 // that ascribe data use to the instance exists, and deleted when all |
189 // ascribing entities go away. | 189 // ascribing entities go away. |
190 DataUseRecorderList data_use_recorders_; | 190 DataUseRecorderList data_use_recorders_; |
191 | 191 |
192 // Map from RenderFrameHost to the MainRenderFrameEntry which contains all | 192 // Map from RenderFrameHost to the MainRenderFrameEntry which contains all |
193 // details of the main frame. New entry is added on main render frame creation | 193 // details of the main frame. New entry is added on main render frame creation |
194 // and removed on its deletion. | 194 // and removed on its deletion. |
(...skipping 12 matching lines...) Expand all Loading... |
207 DataUseRecorderEntry, | 207 DataUseRecorderEntry, |
208 GlobalRequestIDHash> | 208 GlobalRequestIDHash> |
209 pending_navigation_data_use_map_; | 209 pending_navigation_data_use_map_; |
210 | 210 |
211 DISALLOW_COPY_AND_ASSIGN(ChromeDataUseAscriber); | 211 DISALLOW_COPY_AND_ASSIGN(ChromeDataUseAscriber); |
212 }; | 212 }; |
213 | 213 |
214 } // namespace data_use_measurement | 214 } // namespace data_use_measurement |
215 | 215 |
216 #endif // CHROME_BROWSER_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_ | 216 #endif // CHROME_BROWSER_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_ |
OLD | NEW |