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

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

Issue 2857963002: Revert "[PageLoadMetrics] Keep track of Ad Sizes on Pages" (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 #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,
62 bool was_cached, 60 bool was_cached,
63 int64_t raw_body_bytes, 61 int64_t raw_body_bytes,
64 int64_t original_network_content_length, 62 int64_t original_network_content_length,
65 std::unique_ptr<data_reduction_proxy::DataReductionProxyData> 63 std::unique_ptr<data_reduction_proxy::DataReductionProxyData>
66 data_reduction_proxy_data, 64 data_reduction_proxy_data,
67 content::ResourceType detected_resource_type) 65 content::ResourceType detected_resource_type)
68 : url(url), 66 : was_cached(was_cached),
69 frame_tree_node_id(frame_tree_node_id),
70 was_cached(was_cached),
71 raw_body_bytes(raw_body_bytes), 67 raw_body_bytes(raw_body_bytes),
72 original_network_content_length(original_network_content_length), 68 original_network_content_length(original_network_content_length),
73 data_reduction_proxy_data(std::move(data_reduction_proxy_data)), 69 data_reduction_proxy_data(std::move(data_reduction_proxy_data)),
74 resource_type(detected_resource_type) {} 70 resource_type(detected_resource_type) {}
75 71
76 ExtraRequestCompleteInfo::~ExtraRequestCompleteInfo() {} 72 ExtraRequestCompleteInfo::~ExtraRequestCompleteInfo() {}
77 73
78 ExtraRequestStartInfo::ExtraRequestStartInfo(content::ResourceType found_type) 74 ExtraRequestStartInfo::ExtraRequestStartInfo(content::ResourceType found_type)
79 : resource_type(found_type) {} 75 : resource_type(found_type) {}
80 76
(...skipping 18 matching lines...) Expand all
99 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnRedirect( 95 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnRedirect(
100 content::NavigationHandle* navigation_handle) { 96 content::NavigationHandle* navigation_handle) {
101 return CONTINUE_OBSERVING; 97 return CONTINUE_OBSERVING;
102 } 98 }
103 99
104 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnCommit( 100 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnCommit(
105 content::NavigationHandle* navigation_handle) { 101 content::NavigationHandle* navigation_handle) {
106 return CONTINUE_OBSERVING; 102 return CONTINUE_OBSERVING;
107 } 103 }
108 104
109 PageLoadMetricsObserver::ObservePolicy
110 PageLoadMetricsObserver::OnDidFinishSubFrameNavigation(
111 content::NavigationHandle* navigation_handle) {
112 return CONTINUE_OBSERVING;
113 }
114
115 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnHidden( 105 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnHidden(
116 const PageLoadTiming& timing, 106 const PageLoadTiming& timing,
117 const PageLoadExtraInfo& extra_info) { 107 const PageLoadExtraInfo& extra_info) {
118 return CONTINUE_OBSERVING; 108 return CONTINUE_OBSERVING;
119 } 109 }
120 110
121 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnShown() { 111 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnShown() {
122 return CONTINUE_OBSERVING; 112 return CONTINUE_OBSERVING;
123 } 113 }
124 114
125 PageLoadMetricsObserver::ObservePolicy 115 PageLoadMetricsObserver::ObservePolicy
126 PageLoadMetricsObserver::FlushMetricsOnAppEnterBackground( 116 PageLoadMetricsObserver::FlushMetricsOnAppEnterBackground(
127 const PageLoadTiming& timing, 117 const PageLoadTiming& timing,
128 const PageLoadExtraInfo& extra_info) { 118 const PageLoadExtraInfo& extra_info) {
129 return CONTINUE_OBSERVING; 119 return CONTINUE_OBSERVING;
130 } 120 }
131 121
132 PageLoadMetricsObserver::ObservePolicy 122 PageLoadMetricsObserver::ObservePolicy
133 PageLoadMetricsObserver::ShouldObserveMimeType( 123 PageLoadMetricsObserver::ShouldObserveMimeType(
134 const std::string& mime_type) const { 124 const std::string& mime_type) const {
135 return mime_type == "text/html" || mime_type == "application/xhtml+xml" 125 return mime_type == "text/html" || mime_type == "application/xhtml+xml"
136 ? CONTINUE_OBSERVING 126 ? CONTINUE_OBSERVING
137 : STOP_OBSERVING; 127 : STOP_OBSERVING;
138 } 128 }
139 129
140 } // namespace page_load_metrics 130 } // 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