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

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

Issue 2798953002: [PageLoadMetrics] Keep track of Ad Sizes on Pages (Closed)
Patch Set: Rebase 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 #include "chrome/browser/page_load_metrics/page_load_metrics_observer.h" 5 #include "chrome/browser/page_load_metrics/page_load_metrics_observer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 namespace page_load_metrics { 9 namespace page_load_metrics {
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 base::Optional<base::TimeDelta>() /* first_foreground_time */, 50 base::Optional<base::TimeDelta>() /* first_foreground_time */,
51 started_in_foreground /* started_in_foreground */, 51 started_in_foreground /* started_in_foreground */,
52 UserInitiatedInfo::BrowserInitiated(), url, url, true /* did_commit */, 52 UserInitiatedInfo::BrowserInitiated(), url, url, true /* did_commit */,
53 page_load_metrics::END_NONE, 53 page_load_metrics::END_NONE,
54 page_load_metrics::UserInitiatedInfo::NotUserInitiated(), 54 page_load_metrics::UserInitiatedInfo::NotUserInitiated(),
55 base::TimeDelta(), page_load_metrics::PageLoadMetadata(), 55 base::TimeDelta(), page_load_metrics::PageLoadMetadata(),
56 page_load_metrics::PageLoadMetadata()); 56 page_load_metrics::PageLoadMetadata());
57 } 57 }
58 58
59 ExtraRequestCompleteInfo::ExtraRequestCompleteInfo( 59 ExtraRequestCompleteInfo::ExtraRequestCompleteInfo(
60 const GURL& url,
61 int frame_tree_node_id,
60 bool was_cached, 62 bool was_cached,
61 int64_t raw_body_bytes, 63 int64_t raw_body_bytes,
62 int64_t original_network_content_length, 64 int64_t original_network_content_length,
63 std::unique_ptr<data_reduction_proxy::DataReductionProxyData> 65 std::unique_ptr<data_reduction_proxy::DataReductionProxyData>
64 data_reduction_proxy_data, 66 data_reduction_proxy_data,
65 content::ResourceType detected_resource_type) 67 content::ResourceType detected_resource_type)
66 : was_cached(was_cached), 68 : url(url),
69 frame_tree_node_id(frame_tree_node_id),
70 was_cached(was_cached),
67 raw_body_bytes(raw_body_bytes), 71 raw_body_bytes(raw_body_bytes),
68 original_network_content_length(original_network_content_length), 72 original_network_content_length(original_network_content_length),
69 data_reduction_proxy_data(std::move(data_reduction_proxy_data)), 73 data_reduction_proxy_data(std::move(data_reduction_proxy_data)),
70 resource_type(detected_resource_type) {} 74 resource_type(detected_resource_type) {}
71 75
72 ExtraRequestCompleteInfo::~ExtraRequestCompleteInfo() {} 76 ExtraRequestCompleteInfo::~ExtraRequestCompleteInfo() {}
73 77
74 ExtraRequestStartInfo::ExtraRequestStartInfo(content::ResourceType found_type) 78 ExtraRequestStartInfo::ExtraRequestStartInfo(content::ResourceType found_type)
75 : resource_type(found_type) {} 79 : resource_type(found_type) {}
76 80
(...skipping 18 matching lines...) Expand all
95 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnRedirect( 99 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnRedirect(
96 content::NavigationHandle* navigation_handle) { 100 content::NavigationHandle* navigation_handle) {
97 return CONTINUE_OBSERVING; 101 return CONTINUE_OBSERVING;
98 } 102 }
99 103
100 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnCommit( 104 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnCommit(
101 content::NavigationHandle* navigation_handle) { 105 content::NavigationHandle* navigation_handle) {
102 return CONTINUE_OBSERVING; 106 return CONTINUE_OBSERVING;
103 } 107 }
104 108
109 PageLoadMetricsObserver::ObservePolicy
110 PageLoadMetricsObserver::OnDidFinishSubFrameNavigation(
111 content::NavigationHandle* navigation_handle) {
112 return CONTINUE_OBSERVING;
113 }
114
105 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnHidden( 115 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnHidden(
106 const PageLoadTiming& timing, 116 const PageLoadTiming& timing,
107 const PageLoadExtraInfo& extra_info) { 117 const PageLoadExtraInfo& extra_info) {
108 return CONTINUE_OBSERVING; 118 return CONTINUE_OBSERVING;
109 } 119 }
110 120
111 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnShown() { 121 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnShown() {
112 return CONTINUE_OBSERVING; 122 return CONTINUE_OBSERVING;
113 } 123 }
114 124
115 PageLoadMetricsObserver::ObservePolicy 125 PageLoadMetricsObserver::ObservePolicy
116 PageLoadMetricsObserver::FlushMetricsOnAppEnterBackground( 126 PageLoadMetricsObserver::FlushMetricsOnAppEnterBackground(
117 const PageLoadTiming& timing, 127 const PageLoadTiming& timing,
118 const PageLoadExtraInfo& extra_info) { 128 const PageLoadExtraInfo& extra_info) {
119 return CONTINUE_OBSERVING; 129 return CONTINUE_OBSERVING;
120 } 130 }
121 131
122 PageLoadMetricsObserver::ObservePolicy 132 PageLoadMetricsObserver::ObservePolicy
123 PageLoadMetricsObserver::ShouldObserveMimeType( 133 PageLoadMetricsObserver::ShouldObserveMimeType(
124 const std::string& mime_type) const { 134 const std::string& mime_type) const {
125 return mime_type == "text/html" || mime_type == "application/xhtml+xml" 135 return mime_type == "text/html" || mime_type == "application/xhtml+xml"
126 ? CONTINUE_OBSERVING 136 ? CONTINUE_OBSERVING
127 : STOP_OBSERVING; 137 : STOP_OBSERVING;
128 } 138 }
129 139
130 } // namespace page_load_metrics 140 } // namespace page_load_metrics
OLDNEW
« no previous file with comments | « chrome/browser/page_load_metrics/page_load_metrics_observer.h ('k') | chrome/browser/page_load_metrics/page_load_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698