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

Unified Diff: chrome/browser/data_use_measurement/chrome_data_use_ascriber.h

Issue 2875263003: Support for transfer navigations in data use ascriber (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/data_use_measurement/chrome_data_use_ascriber.h
diff --git a/chrome/browser/data_use_measurement/chrome_data_use_ascriber.h b/chrome/browser/data_use_measurement/chrome_data_use_ascriber.h
index f1e9b7b35dc0f327126059dbe40077bda897f551..e56f79f2aed5f228f80ad1a59487236f960e2be5 100644
--- a/chrome/browser/data_use_measurement/chrome_data_use_ascriber.h
+++ b/chrome/browser/data_use_measurement/chrome_data_use_ascriber.h
@@ -86,12 +86,9 @@ class ChromeDataUseAscriber : public DataUseAscriber {
// Called when a main frame navigation is ready to be committed in a
// renderer.
void ReadyToCommitMainFrameNavigation(
- GURL gurl,
content::GlobalRequestID global_request_id,
int render_process_id,
- int render_frame_id,
- bool is_same_page_navigation,
- void* navigation_handle);
+ int render_frame_id);
// Called every time the WebContents changes visibility.
void WasShownOrHidden(int main_render_process_id,
@@ -106,6 +103,8 @@ class ChromeDataUseAscriber : public DataUseAscriber {
void DidFinishNavigation(int render_process_id,
int render_frame_id,
+ GURL gurl,
+ bool is_same_page_navigation,
uint32_t page_transition);
private:
@@ -154,7 +153,8 @@ class ChromeDataUseAscriber : public DataUseAscriber {
// ascribing entities go away.
DataUseRecorderList data_use_recorders_;
- // Map from RenderFrameHost to the DataUseRecorderEntry in
+ // TODO(rajendrant): Combine the multiple hash_maps keyed by
+ // RenderFrameHostID. Map from RenderFrameHost to the DataUseRecorderEntry in
// |data_use_recorders_| that the main frame ascribes data use to.
base::hash_map<RenderFrameHostID, DataUseRecorderEntry>
main_render_frame_data_use_map_;
@@ -172,6 +172,12 @@ class ChromeDataUseAscriber : public DataUseAscriber {
GlobalRequestIDHash>
pending_navigation_data_use_map_;
+ // Contains the global requestid of pending navigations in the mainframe. This
+ // is needed to support navigations that transfer from one mainframe to
+ // another.
+ base::hash_map<RenderFrameHostID, content::GlobalRequestID>
+ pending_navigation_global_request_id_;
+
// Contains the mainframe IDs that are currently visible.
base::hash_set<RenderFrameHostID> visible_main_render_frames_;

Powered by Google App Engine
This is Rietveld 408576698