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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 void NotifyClientRedirectTo(const PageLoadTracker& destination); | 175 void NotifyClientRedirectTo(const PageLoadTracker& destination); |
176 | 176 |
177 void UpdateTiming(const PageLoadTiming& timing, | 177 void UpdateTiming(const PageLoadTiming& timing, |
178 const PageLoadMetadata& metadata); | 178 const PageLoadMetadata& metadata); |
179 | 179 |
180 // Update metadata for child frames. Updates for child frames arrive | 180 // Update metadata for child frames. Updates for child frames arrive |
181 // separately from updates for the main frame, so aren't included in | 181 // separately from updates for the main frame, so aren't included in |
182 // UpdateTiming. | 182 // UpdateTiming. |
183 void UpdateChildFrameMetadata(const PageLoadMetadata& child_metadata); | 183 void UpdateChildFrameMetadata(const PageLoadMetadata& child_metadata); |
184 | 184 |
185 void OnLoadedResource(const ExtraRequestInfo& extra_request_info); | 185 void OnStartedResource( |
| 186 const ExtraRequestStartInfo& extra_request_started_info); |
| 187 |
| 188 void OnLoadedResource( |
| 189 const ExtraRequestCompleteInfo& extra_request_complete_info); |
186 | 190 |
187 // Signals that we should stop tracking metrics for the associated page load. | 191 // Signals that we should stop tracking metrics for the associated page load. |
188 // We may stop tracking a page load if it doesn't meet the criteria for | 192 // We may stop tracking a page load if it doesn't meet the criteria for |
189 // tracking metrics in DidFinishNavigation. | 193 // tracking metrics in DidFinishNavigation. |
190 void StopTracking(); | 194 void StopTracking(); |
191 | 195 |
192 int aborted_chain_size() const { return aborted_chain_size_; } | 196 int aborted_chain_size() const { return aborted_chain_size_; } |
193 int aborted_chain_size_same_url() const { | 197 int aborted_chain_size_same_url() const { |
194 return aborted_chain_size_same_url_; | 198 return aborted_chain_size_same_url_; |
195 } | 199 } |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 PageLoadMetricsEmbedderInterface* const embedder_interface_; | 357 PageLoadMetricsEmbedderInterface* const embedder_interface_; |
354 | 358 |
355 std::vector<std::unique_ptr<PageLoadMetricsObserver>> observers_; | 359 std::vector<std::unique_ptr<PageLoadMetricsObserver>> observers_; |
356 | 360 |
357 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); | 361 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); |
358 }; | 362 }; |
359 | 363 |
360 } // namespace page_load_metrics | 364 } // namespace page_load_metrics |
361 | 365 |
362 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ | 366 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ |
OLD | NEW |