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

Side by Side Diff: chrome/browser/page_load_metrics/page_load_metrics_observer.h

Issue 2874663005: [Page Load Metrics] Add mojom file to page load metrics. (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 unified diff | Download patch
OLDNEW
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 CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 const base::Optional<base::TimeDelta>& first_background_time, 115 const base::Optional<base::TimeDelta>& first_background_time,
116 const base::Optional<base::TimeDelta>& first_foreground_time, 116 const base::Optional<base::TimeDelta>& first_foreground_time,
117 bool started_in_foreground, 117 bool started_in_foreground,
118 UserInitiatedInfo user_initiated_info, 118 UserInitiatedInfo user_initiated_info,
119 const GURL& url, 119 const GURL& url,
120 const GURL& start_url, 120 const GURL& start_url,
121 bool did_commit, 121 bool did_commit,
122 PageEndReason page_end_reason, 122 PageEndReason page_end_reason,
123 UserInitiatedInfo page_end_user_initiated_info, 123 UserInitiatedInfo page_end_user_initiated_info,
124 const base::Optional<base::TimeDelta>& page_end_time, 124 const base::Optional<base::TimeDelta>& page_end_time,
125 const PageLoadMetadata& main_frame_metadata, 125 const mojom::PageLoadMetadata& main_frame_metadata,
126 const PageLoadMetadata& child_frame_metadata); 126 const mojom::PageLoadMetadata& child_frame_metadata);
127 127
128 // Simplified version of the constructor, intended for use in tests. 128 // Simplified version of the constructor, intended for use in tests.
129 static PageLoadExtraInfo CreateForTesting(const GURL& url, 129 static PageLoadExtraInfo CreateForTesting(const GURL& url,
130 bool started_in_foreground); 130 bool started_in_foreground);
131 131
132 PageLoadExtraInfo(const PageLoadExtraInfo& other); 132 PageLoadExtraInfo(const PageLoadExtraInfo& other);
133 133
134 ~PageLoadExtraInfo(); 134 ~PageLoadExtraInfo();
135 135
136 // The time the navigation was initiated. 136 // The time the navigation was initiated.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // * the page load is stopped 185 // * the page load is stopped
186 // * the tab hosting the page is closed 186 // * the tab hosting the page is closed
187 // * the render process hosting the page goes away 187 // * the render process hosting the page goes away
188 // * a new navigation which later commits is initiated in the same tab 188 // * a new navigation which later commits is initiated in the same tab
189 // This field will not be set if the page is still active and hasn't yet 189 // This field will not be set if the page is still active and hasn't yet
190 // finished. 190 // finished.
191 const base::Optional<base::TimeDelta> page_end_time; 191 const base::Optional<base::TimeDelta> page_end_time;
192 192
193 // Extra information supplied to the page load metrics system from the 193 // Extra information supplied to the page load metrics system from the
194 // renderer for the main frame. 194 // renderer for the main frame.
195 const PageLoadMetadata main_frame_metadata; 195 const mojom::PageLoadMetadata main_frame_metadata;
196 196
197 // PageLoadMetadata for child frames of the current page load. 197 // PageLoadMetadata for child frames of the current page load.
198 const PageLoadMetadata child_frame_metadata; 198 const mojom::PageLoadMetadata child_frame_metadata;
199 }; 199 };
200 200
201 // Container for various information about a completed request within a page 201 // Container for various information about a completed request within a page
202 // load. 202 // load.
203 struct ExtraRequestCompleteInfo { 203 struct ExtraRequestCompleteInfo {
204 ExtraRequestCompleteInfo( 204 ExtraRequestCompleteInfo(
205 const GURL& url, 205 const GURL& url,
206 int frame_tree_node_id, 206 int frame_tree_node_id,
207 bool was_cached, 207 bool was_cached,
208 int64_t raw_body_bytes, 208 int64_t raw_body_bytes,
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 // Called whenever a request is loaded for this page load. This comes 426 // Called whenever a request is loaded for this page load. This comes
427 // unfiltered from the ResourceDispatcherHost and may include blob requests 427 // unfiltered from the ResourceDispatcherHost and may include blob requests
428 // and data uris. 428 // and data uris.
429 virtual void OnLoadedResource( 429 virtual void OnLoadedResource(
430 const ExtraRequestCompleteInfo& extra_request_complete_info) {} 430 const ExtraRequestCompleteInfo& extra_request_complete_info) {}
431 }; 431 };
432 432
433 } // namespace page_load_metrics 433 } // namespace page_load_metrics
434 434
435 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ 435 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698