OLD | NEW |
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 Loading... |
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_ |
OLD | NEW |