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

Side by Side Diff: chrome/browser/data_use_measurement/chrome_data_use_ascriber.h

Issue 2865913002: Support for identifying traffic type in data use ascriber (Closed)
Patch Set: compile fix Created 3 years, 7 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 private: 136 private:
137 DataUseRecorderEntry entry_; 137 DataUseRecorderEntry entry_;
138 }; 138 };
139 139
140 DataUseRecorderEntry GetOrCreateDataUseRecorderEntry( 140 DataUseRecorderEntry GetOrCreateDataUseRecorderEntry(
141 net::URLRequest* request); 141 net::URLRequest* request);
142 142
143 void OnDataUseCompleted(DataUseRecorderEntry entry); 143 void OnDataUseCompleted(DataUseRecorderEntry entry);
144 144
145 DataUseRecorderEntry CreateNewDataUseRecorder(net::URLRequest* request); 145 DataUseRecorderEntry CreateNewDataUseRecorder(
146 net::URLRequest* request,
147 DataUse::TrafficType traffic_type);
146 148
147 bool IsRecorderInPendingNavigationMap(net::URLRequest* request); 149 bool IsRecorderInPendingNavigationMap(net::URLRequest* request);
148 150
149 bool IsRecorderInRenderFrameMap(net::URLRequest* request); 151 bool IsRecorderInRenderFrameMap(net::URLRequest* request);
150 152
151 // Owner for all instances of DataUseRecorder. An instance is kept in this 153 // Owner for all instances of DataUseRecorder. An instance is kept in this
152 // list if any entity (render frame hosts, URLRequests, pending navigations) 154 // list if any entity (render frame hosts, URLRequests, pending navigations)
153 // that ascribe data use to the instance exists, and deleted when all 155 // that ascribe data use to the instance exists, and deleted when all
154 // ascribing entities go away. 156 // ascribing entities go away.
155 DataUseRecorderList data_use_recorders_; 157 DataUseRecorderList data_use_recorders_;
(...skipping 18 matching lines...) Expand all
174 176
175 // Contains the mainframe IDs that are currently visible. 177 // Contains the mainframe IDs that are currently visible.
176 base::hash_set<RenderFrameHostID> visible_main_render_frames_; 178 base::hash_set<RenderFrameHostID> visible_main_render_frames_;
177 179
178 DISALLOW_COPY_AND_ASSIGN(ChromeDataUseAscriber); 180 DISALLOW_COPY_AND_ASSIGN(ChromeDataUseAscriber);
179 }; 181 };
180 182
181 } // namespace data_use_measurement 183 } // namespace data_use_measurement
182 184
183 #endif // CHROME_BROWSER_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_ 185 #endif // CHROME_BROWSER_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698