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

Side by Side Diff: chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer.h

Issue 2859393002: Report page load timing information for child frames. (Closed)
Patch Set: add browsertests 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_OBSERVERS_ADS_PAGE_LOAD_METRICS_OBSERVE R_H_ 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ADS_PAGE_LOAD_METRICS_OBSERVE R_H_
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ADS_PAGE_LOAD_METRICS_OBSERVE R_H_ 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ADS_PAGE_LOAD_METRICS_OBSERVE R_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 18 matching lines...) Expand all
29 content::NavigationHandle* navigation_handle) override; 29 content::NavigationHandle* navigation_handle) override;
30 ObservePolicy FlushMetricsOnAppEnterBackground( 30 ObservePolicy FlushMetricsOnAppEnterBackground(
31 const page_load_metrics::PageLoadTiming& timing, 31 const page_load_metrics::PageLoadTiming& timing,
32 const page_load_metrics::PageLoadExtraInfo& extra_info) override; 32 const page_load_metrics::PageLoadExtraInfo& extra_info) override;
33 void OnLoadedResource(const page_load_metrics::ExtraRequestCompleteInfo& 33 void OnLoadedResource(const page_load_metrics::ExtraRequestCompleteInfo&
34 extra_request_info) override; 34 extra_request_info) override;
35 void OnComplete(const page_load_metrics::PageLoadTiming& timing, 35 void OnComplete(const page_load_metrics::PageLoadTiming& timing,
36 const page_load_metrics::PageLoadExtraInfo& info) override; 36 const page_load_metrics::PageLoadExtraInfo& info) override;
37 37
38 private: 38 private:
39 using FrameTreeNodeId = int;
40
41 struct AdFrameData { 39 struct AdFrameData {
42 explicit AdFrameData(FrameTreeNodeId frame_tree_node_id); 40 explicit AdFrameData(FrameTreeNodeId frame_tree_node_id);
43 size_t frame_bytes; 41 size_t frame_bytes;
44 size_t frame_bytes_uncached; 42 size_t frame_bytes_uncached;
45 const FrameTreeNodeId frame_tree_node_id; 43 const FrameTreeNodeId frame_tree_node_id;
46 }; 44 };
47 45
48 void ProcessLoadedResource( 46 void ProcessLoadedResource(
49 const page_load_metrics::ExtraRequestCompleteInfo& extra_request_info); 47 const page_load_metrics::ExtraRequestCompleteInfo& extra_request_info);
50 void RecordHistograms(); 48 void RecordHistograms();
(...skipping 22 matching lines...) Expand all
73 71
74 size_t page_bytes_ = 0u; 72 size_t page_bytes_ = 0u;
75 size_t uncached_page_bytes_ = 0u; 73 size_t uncached_page_bytes_ = 0u;
76 int top_level_subframe_count_ = 0; 74 int top_level_subframe_count_ = 0;
77 int top_level_ad_frame_count_ = 0; 75 int top_level_ad_frame_count_ = 0;
78 76
79 DISALLOW_COPY_AND_ASSIGN(AdsPageLoadMetricsObserver); 77 DISALLOW_COPY_AND_ASSIGN(AdsPageLoadMetricsObserver);
80 }; 78 };
81 79
82 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ADS_PAGE_LOAD_METRICS_OBSE RVER_H_ 80 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ADS_PAGE_LOAD_METRICS_OBSE RVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698