| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_TRACKER_H_ | 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ |
| 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ | 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 void LogAbortChainHistograms(content::NavigationHandle* final_navigation); | 336 void LogAbortChainHistograms(content::NavigationHandle* final_navigation); |
| 337 | 337 |
| 338 void MaybeUpdateURL(content::NavigationHandle* navigation_handle); | 338 void MaybeUpdateURL(content::NavigationHandle* navigation_handle); |
| 339 | 339 |
| 340 // Merge values from |new_paint_timing| into |merged_page_timing_|, offsetting | 340 // Merge values from |new_paint_timing| into |merged_page_timing_|, offsetting |
| 341 // any new timings by the |navigation_start_offset|. | 341 // any new timings by the |navigation_start_offset|. |
| 342 void MergePaintTiming(base::TimeDelta navigation_start_offset, | 342 void MergePaintTiming(base::TimeDelta navigation_start_offset, |
| 343 const page_load_metrics::PaintTiming& new_paint_timing, | 343 const page_load_metrics::PaintTiming& new_paint_timing, |
| 344 bool is_main_frame); | 344 bool is_main_frame); |
| 345 | 345 |
| 346 void DispatchTimingUpdates(); |
| 347 |
| 346 UserInputTracker input_tracker_; | 348 UserInputTracker input_tracker_; |
| 347 | 349 |
| 348 // Whether we stopped tracking this navigation after it was initiated. We may | 350 // Whether we stopped tracking this navigation after it was initiated. We may |
| 349 // stop tracking a navigation if it doesn't meet the criteria for tracking | 351 // stop tracking a navigation if it doesn't meet the criteria for tracking |
| 350 // metrics in DidFinishNavigation. | 352 // metrics in DidFinishNavigation. |
| 351 bool did_stop_tracking_; | 353 bool did_stop_tracking_; |
| 352 | 354 |
| 353 // Whether the application went into the background when this PageLoadTracker | 355 // Whether the application went into the background when this PageLoadTracker |
| 354 // was active. This is a temporary boolean for UMA tracking. | 356 // was active. This is a temporary boolean for UMA tracking. |
| 355 bool app_entered_background_; | 357 bool app_entered_background_; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 // because metrics like layout/paint are delayed artificially | 391 // because metrics like layout/paint are delayed artificially |
| 390 // when they occur in the background. | 392 // when they occur in the background. |
| 391 base::TimeTicks background_time_; | 393 base::TimeTicks background_time_; |
| 392 base::TimeTicks foreground_time_; | 394 base::TimeTicks foreground_time_; |
| 393 bool started_in_foreground_; | 395 bool started_in_foreground_; |
| 394 | 396 |
| 395 // PageLoadTiming for the currently tracked page. The fields in |paint_timing| | 397 // PageLoadTiming for the currently tracked page. The fields in |paint_timing| |
| 396 // are merged across all frames in the document. All other fields are for the | 398 // are merged across all frames in the document. All other fields are for the |
| 397 // main frame document. | 399 // main frame document. |
| 398 PageLoadTiming merged_page_timing_; | 400 PageLoadTiming merged_page_timing_; |
| 401 PageLoadTiming last_dispatched_merged_page_timing_; |
| 399 | 402 |
| 400 PageLoadMetadata main_frame_metadata_; | 403 PageLoadMetadata main_frame_metadata_; |
| 404 PageLoadMetadata last_dispatched_main_frame_metadata_; |
| 405 |
| 401 PageLoadMetadata subframe_metadata_; | 406 PageLoadMetadata subframe_metadata_; |
| 402 | 407 |
| 403 ui::PageTransition page_transition_; | 408 ui::PageTransition page_transition_; |
| 404 | 409 |
| 405 base::Optional<content::GlobalRequestID> navigation_request_id_; | 410 base::Optional<content::GlobalRequestID> navigation_request_id_; |
| 406 | 411 |
| 407 // Whether this page load was user initiated. | 412 // Whether this page load was user initiated. |
| 408 UserInitiatedInfo user_initiated_info_; | 413 UserInitiatedInfo user_initiated_info_; |
| 409 | 414 |
| 410 // This is a subtle member. If a provisional load A gets aborted by | 415 // This is a subtle member. If a provisional load A gets aborted by |
| (...skipping 16 matching lines...) Expand all Loading... |
| 427 // Navigation start offsets for the most recently committed document in each | 432 // Navigation start offsets for the most recently committed document in each |
| 428 // frame. | 433 // frame. |
| 429 std::map<FrameTreeNodeId, base::TimeDelta> subframe_navigation_start_offset_; | 434 std::map<FrameTreeNodeId, base::TimeDelta> subframe_navigation_start_offset_; |
| 430 | 435 |
| 431 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); | 436 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); |
| 432 }; | 437 }; |
| 433 | 438 |
| 434 } // namespace page_load_metrics | 439 } // namespace page_load_metrics |
| 435 | 440 |
| 436 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ | 441 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ |
| OLD | NEW |