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

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

Issue 2380773002: Prevent tracking metrics for cases such as 204s and downloads. (Closed)
Patch Set: fix comment, and disable tests for browser side navigation Created 4 years, 2 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 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/optional.h" 9 #include "base/optional.h"
10 #include "chrome/common/page_load_metrics/page_load_timing.h" 10 #include "chrome/common/page_load_metrics/page_load_timing.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // collected over the course of the page load. Most observers should not need 247 // collected over the course of the page load. Most observers should not need
248 // to implement these callbacks, and should implement the On* timing callbacks 248 // to implement these callbacks, and should implement the On* timing callbacks
249 // instead. 249 // instead.
250 250
251 // OnComplete is invoked for tracked page loads that committed, immediately 251 // OnComplete is invoked for tracked page loads that committed, immediately
252 // before the observer is deleted. 252 // before the observer is deleted.
253 virtual void OnComplete(const PageLoadTiming& timing, 253 virtual void OnComplete(const PageLoadTiming& timing,
254 const PageLoadExtraInfo& extra_info) {} 254 const PageLoadExtraInfo& extra_info) {}
255 255
256 // OnFailedProvisionalLoad is invoked for tracked page loads that did not 256 // OnFailedProvisionalLoad is invoked for tracked page loads that did not
257 // commit, immediately before the observer is deleted. Note that provisional 257 // commit, immediately before the observer is deleted.
258 // loads that result in downloads or 204s are aborted by the system, and are
259 // also included as failed provisional loads.
260 virtual void OnFailedProvisionalLoad( 258 virtual void OnFailedProvisionalLoad(
261 const FailedProvisionalLoadInfo& failed_provisional_load_info, 259 const FailedProvisionalLoadInfo& failed_provisional_load_info,
262 const PageLoadExtraInfo& extra_info) {} 260 const PageLoadExtraInfo& extra_info) {}
263 }; 261 };
264 262
265 } // namespace page_load_metrics 263 } // namespace page_load_metrics
266 264
267 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ 265 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698