Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(633)

Side by Side Diff: chrome/browser/page_load_metrics/page_load_tracker.h

Issue 2780003003: Send an event to the page load metrics to track resource starting. (Closed)
Patch Set: Fix browser tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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(const ExtraRequestStartInfo& extra_request_info);
186
187 void OnLoadedResource(const ExtraRequestCompleteInfo& extra_request_info);
186 188
187 // Signals that we should stop tracking metrics for the associated page load. 189 // 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 190 // We may stop tracking a page load if it doesn't meet the criteria for
189 // tracking metrics in DidFinishNavigation. 191 // tracking metrics in DidFinishNavigation.
190 void StopTracking(); 192 void StopTracking();
191 193
192 int aborted_chain_size() const { return aborted_chain_size_; } 194 int aborted_chain_size() const { return aborted_chain_size_; }
193 int aborted_chain_size_same_url() const { 195 int aborted_chain_size_same_url() const {
194 return aborted_chain_size_same_url_; 196 return aborted_chain_size_same_url_;
195 } 197 }
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 PageLoadMetricsEmbedderInterface* const embedder_interface_; 355 PageLoadMetricsEmbedderInterface* const embedder_interface_;
354 356
355 std::vector<std::unique_ptr<PageLoadMetricsObserver>> observers_; 357 std::vector<std::unique_ptr<PageLoadMetricsObserver>> observers_;
356 358
357 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); 359 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker);
358 }; 360 };
359 361
360 } // namespace page_load_metrics 362 } // namespace page_load_metrics
361 363
362 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ 364 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698