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

Side by Side Diff: chrome/browser/page_load_metrics/observers/ads_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 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 12 matching lines...) Expand all
23 static std::unique_ptr<AdsPageLoadMetricsObserver> CreateIfNeeded(); 23 static std::unique_ptr<AdsPageLoadMetricsObserver> CreateIfNeeded();
24 24
25 AdsPageLoadMetricsObserver(); 25 AdsPageLoadMetricsObserver();
26 ~AdsPageLoadMetricsObserver() override; 26 ~AdsPageLoadMetricsObserver() override;
27 27
28 // page_load_metrics::PageLoadMetricsObserver 28 // page_load_metrics::PageLoadMetricsObserver
29 ObservePolicy OnCommit(content::NavigationHandle* navigation_handle) override; 29 ObservePolicy OnCommit(content::NavigationHandle* navigation_handle) override;
30 ObservePolicy OnDidFinishSubFrameNavigation( 30 ObservePolicy OnDidFinishSubFrameNavigation(
31 content::NavigationHandle* navigation_handle) override; 31 content::NavigationHandle* navigation_handle) override;
32 ObservePolicy FlushMetricsOnAppEnterBackground( 32 ObservePolicy FlushMetricsOnAppEnterBackground(
33 const page_load_metrics::PageLoadTiming& timing, 33 const page_load_metrics::mojom::PageLoadTiming& timing,
34 const page_load_metrics::PageLoadExtraInfo& extra_info) override; 34 const page_load_metrics::PageLoadExtraInfo& extra_info) override;
35 void OnLoadedResource(const page_load_metrics::ExtraRequestCompleteInfo& 35 void OnLoadedResource(const page_load_metrics::ExtraRequestCompleteInfo&
36 extra_request_info) override; 36 extra_request_info) override;
37 void OnComplete(const page_load_metrics::PageLoadTiming& timing, 37 void OnComplete(const page_load_metrics::mojom::PageLoadTiming& timing,
38 const page_load_metrics::PageLoadExtraInfo& info) override; 38 const page_load_metrics::PageLoadExtraInfo& info) override;
39 39
40 private: 40 private:
41 using FrameTreeNodeId = int; 41 using FrameTreeNodeId = int;
42 42
43 struct AdFrameData { 43 struct AdFrameData {
44 explicit AdFrameData(FrameTreeNodeId frame_tree_node_id); 44 explicit AdFrameData(FrameTreeNodeId frame_tree_node_id);
45 size_t frame_bytes; 45 size_t frame_bytes;
46 size_t frame_bytes_uncached; 46 size_t frame_bytes_uncached;
47 const FrameTreeNodeId frame_tree_node_id; 47 const FrameTreeNodeId frame_tree_node_id;
(...skipping 27 matching lines...) Expand all
75 75
76 size_t page_bytes_ = 0u; 76 size_t page_bytes_ = 0u;
77 size_t uncached_page_bytes_ = 0u; 77 size_t uncached_page_bytes_ = 0u;
78 int top_level_subframe_count_ = 0; 78 int top_level_subframe_count_ = 0;
79 int top_level_ad_frame_count_ = 0; 79 int top_level_ad_frame_count_ = 0;
80 80
81 DISALLOW_COPY_AND_ASSIGN(AdsPageLoadMetricsObserver); 81 DISALLOW_COPY_AND_ASSIGN(AdsPageLoadMetricsObserver);
82 }; 82 };
83 83
84 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ADS_PAGE_LOAD_METRICS_OBSE RVER_H_ 84 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ADS_PAGE_LOAD_METRICS_OBSE RVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698