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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 void NotifyClientRedirectTo(const PageLoadTracker& destination); | 218 void NotifyClientRedirectTo(const PageLoadTracker& destination); |
219 | 219 |
220 void UpdateTiming(const PageLoadTiming& timing, | 220 void UpdateTiming(const PageLoadTiming& timing, |
221 const PageLoadMetadata& metadata); | 221 const PageLoadMetadata& metadata); |
222 | 222 |
223 // Update metadata for child frames. Updates for child frames arrive | 223 // Update metadata for child frames. Updates for child frames arrive |
224 // separately from updates for the main frame, so aren't included in | 224 // separately from updates for the main frame, so aren't included in |
225 // UpdateTiming. | 225 // UpdateTiming. |
226 void UpdateChildFrameMetadata(const PageLoadMetadata& child_metadata); | 226 void UpdateChildFrameMetadata(const PageLoadMetadata& child_metadata); |
227 | 227 |
228 void OnLoadedResource(const ExtraRequestInfo& extra_request_info); | 228 void OnStartedResource( |
| 229 const ExtraRequestStartInfo& extra_request_started_info); |
| 230 |
| 231 void OnLoadedResource( |
| 232 const ExtraRequestCompleteInfo& extra_request_complete_info); |
229 | 233 |
230 // Signals that we should stop tracking metrics for the associated page load. | 234 // Signals that we should stop tracking metrics for the associated page load. |
231 // We may stop tracking a page load if it doesn't meet the criteria for | 235 // We may stop tracking a page load if it doesn't meet the criteria for |
232 // tracking metrics in DidFinishNavigation. | 236 // tracking metrics in DidFinishNavigation. |
233 void StopTracking(); | 237 void StopTracking(); |
234 | 238 |
235 int aborted_chain_size() const { return aborted_chain_size_; } | 239 int aborted_chain_size() const { return aborted_chain_size_; } |
236 int aborted_chain_size_same_url() const { | 240 int aborted_chain_size_same_url() const { |
237 return aborted_chain_size_same_url_; | 241 return aborted_chain_size_same_url_; |
238 } | 242 } |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 PageLoadMetricsEmbedderInterface* const embedder_interface_; | 400 PageLoadMetricsEmbedderInterface* const embedder_interface_; |
397 | 401 |
398 std::vector<std::unique_ptr<PageLoadMetricsObserver>> observers_; | 402 std::vector<std::unique_ptr<PageLoadMetricsObserver>> observers_; |
399 | 403 |
400 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); | 404 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); |
401 }; | 405 }; |
402 | 406 |
403 } // namespace page_load_metrics | 407 } // namespace page_load_metrics |
404 | 408 |
405 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ | 409 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ |
OLD | NEW |