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

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

Issue 2888673002: Add support for counting same-document AMP loads. (Closed)
Patch Set: address comment 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnRedirect( 99 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnRedirect(
100 content::NavigationHandle* navigation_handle) { 100 content::NavigationHandle* navigation_handle) {
101 return CONTINUE_OBSERVING; 101 return CONTINUE_OBSERVING;
102 } 102 }
103 103
104 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnCommit( 104 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnCommit(
105 content::NavigationHandle* navigation_handle) { 105 content::NavigationHandle* navigation_handle) {
106 return CONTINUE_OBSERVING; 106 return CONTINUE_OBSERVING;
107 } 107 }
108 108
109 PageLoadMetricsObserver::ObservePolicy
110 PageLoadMetricsObserver::OnDidFinishSubFrameNavigation(
111 content::NavigationHandle* navigation_handle) {
112 return CONTINUE_OBSERVING;
113 }
114
115 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnHidden( 109 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnHidden(
116 const PageLoadTiming& timing, 110 const PageLoadTiming& timing,
117 const PageLoadExtraInfo& extra_info) { 111 const PageLoadExtraInfo& extra_info) {
118 return CONTINUE_OBSERVING; 112 return CONTINUE_OBSERVING;
119 } 113 }
120 114
121 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnShown() { 115 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnShown() {
122 return CONTINUE_OBSERVING; 116 return CONTINUE_OBSERVING;
123 } 117 }
124 118
125 PageLoadMetricsObserver::ObservePolicy 119 PageLoadMetricsObserver::ObservePolicy
126 PageLoadMetricsObserver::FlushMetricsOnAppEnterBackground( 120 PageLoadMetricsObserver::FlushMetricsOnAppEnterBackground(
127 const PageLoadTiming& timing, 121 const PageLoadTiming& timing,
128 const PageLoadExtraInfo& extra_info) { 122 const PageLoadExtraInfo& extra_info) {
129 return CONTINUE_OBSERVING; 123 return CONTINUE_OBSERVING;
130 } 124 }
131 125
132 PageLoadMetricsObserver::ObservePolicy 126 PageLoadMetricsObserver::ObservePolicy
133 PageLoadMetricsObserver::ShouldObserveMimeType( 127 PageLoadMetricsObserver::ShouldObserveMimeType(
134 const std::string& mime_type) const { 128 const std::string& mime_type) const {
135 return mime_type == "text/html" || mime_type == "application/xhtml+xml" 129 return mime_type == "text/html" || mime_type == "application/xhtml+xml"
136 ? CONTINUE_OBSERVING 130 ? CONTINUE_OBSERVING
137 : STOP_OBSERVING; 131 : STOP_OBSERVING;
138 } 132 }
139 133
140 } // namespace page_load_metrics 134 } // 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