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

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: 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 // Returns true if the timing was successfully updated. 163 // Returns true if the timing was successfully updated.
164 bool UpdateTiming(const PageLoadTiming& timing, 164 bool UpdateTiming(const PageLoadTiming& timing,
165 const PageLoadMetadata& metadata); 165 const PageLoadMetadata& metadata);
166 166
167 // Update metadata for child frames. Updates for child frames arrive 167 // Update metadata for child frames. Updates for child frames arrive
168 // separately from updates for the main frame, so aren't included in 168 // separately from updates for the main frame, so aren't included in
169 // UpdateTiming. 169 // UpdateTiming.
170 void UpdateChildFrameMetadata(const PageLoadMetadata& child_metadata); 170 void UpdateChildFrameMetadata(const PageLoadMetadata& child_metadata);
171 171
172 void OnStartedResource(const ExtraRequestInfo& extra_request_info);
173
172 void OnLoadedResource(const ExtraRequestInfo& extra_request_info); 174 void OnLoadedResource(const ExtraRequestInfo& extra_request_info);
173 175
174 // Signals that we should stop tracking metrics for the associated page load. 176 // Signals that we should stop tracking metrics for the associated page load.
175 // We may stop tracking a page load if it doesn't meet the criteria for 177 // We may stop tracking a page load if it doesn't meet the criteria for
176 // tracking metrics in DidFinishNavigation. 178 // tracking metrics in DidFinishNavigation.
177 void StopTracking(); 179 void StopTracking();
178 180
179 int aborted_chain_size() const { return aborted_chain_size_; } 181 int aborted_chain_size() const { return aborted_chain_size_; }
180 int aborted_chain_size_same_url() const { 182 int aborted_chain_size_same_url() const {
181 return aborted_chain_size_same_url_; 183 return aborted_chain_size_same_url_;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 PageLoadMetricsEmbedderInterface* const embedder_interface_; 336 PageLoadMetricsEmbedderInterface* const embedder_interface_;
335 337
336 std::vector<std::unique_ptr<PageLoadMetricsObserver>> observers_; 338 std::vector<std::unique_ptr<PageLoadMetricsObserver>> observers_;
337 339
338 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); 340 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker);
339 }; 341 };
340 342
341 } // namespace page_load_metrics 343 } // namespace page_load_metrics
342 344
343 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ 345 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698