Chromium Code Reviews| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 362 // frequently on Android). | 362 // frequently on Android). |
| 363 virtual void OnComplete(const PageLoadTiming& timing, | 363 virtual void OnComplete(const PageLoadTiming& timing, |
| 364 const PageLoadExtraInfo& extra_info) {} | 364 const PageLoadExtraInfo& extra_info) {} |
| 365 | 365 |
| 366 // OnFailedProvisionalLoad is invoked for tracked page loads that did not | 366 // OnFailedProvisionalLoad is invoked for tracked page loads that did not |
| 367 // commit, immediately before the observer is deleted. | 367 // commit, immediately before the observer is deleted. |
| 368 virtual void OnFailedProvisionalLoad( | 368 virtual void OnFailedProvisionalLoad( |
| 369 const FailedProvisionalLoadInfo& failed_provisional_load_info, | 369 const FailedProvisionalLoadInfo& failed_provisional_load_info, |
| 370 const PageLoadExtraInfo& extra_info) {} | 370 const PageLoadExtraInfo& extra_info) {} |
| 371 | 371 |
| 372 // Called whenever a request load begins. | |
| 373 virtual void OnStartedResource(const ExtraRequestInfo& extra_request_info) {} | |
|
RyanSturm
2017/03/29 19:03:47
I'd recommend adding an actual observer (and tests
Pete Williamson
2017/04/13 23:10:21
Done.
| |
| 374 | |
| 372 // Called whenever a request is loaded for this page load. | 375 // Called whenever a request is loaded for this page load. |
| 373 virtual void OnLoadedResource(const ExtraRequestInfo& extra_request_info) {} | 376 virtual void OnLoadedResource(const ExtraRequestInfo& extra_request_info) {} |
| 374 }; | 377 }; |
| 375 | 378 |
| 376 } // namespace page_load_metrics | 379 } // namespace page_load_metrics |
| 377 | 380 |
| 378 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ | 381 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ |
| OLD | NEW |