Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/page_load_metrics/observers/resource_tracking_page_load _metrics_observer.h" | |
| 6 | |
| 7 namespace page_load_metrics { | |
| 8 | |
| 9 ResourceTrackingPageLoadMetricsObserver:: | |
| 10 ResourceTrackingPageLoadMetricsObserver() | |
| 11 : started_count_(0), completed_count_(0) {} | |
| 12 ResourceTrackingPageLoadMetricsObserver:: | |
| 13 ~ResourceTrackingPageLoadMetricsObserver() {} | |
| 14 | |
| 15 void ResourceTrackingPageLoadMetricsObserver::OnStartedResource( | |
| 16 const ExtraRequestStartInfo& extra_request_start_info) { | |
| 17 // TODO(petewiL): Store this by type. | |
| 18 ++started_count_; | |
| 19 } | |
| 20 | |
| 21 void ResourceTrackingPageLoadMetricsObserver::OnLoadedResource( | |
| 22 const ExtraRequestCompleteInfo& extra_request_complete_info) { | |
| 23 // TODO(petewil): Check to see if the type of the request changed. If it did, | |
| 24 // update the old and new types for the started type. Then update by type for | |
| 25 // the completed type. | |
| 26 ++completed_count_; | |
| 27 } | |
| 28 | |
| 29 void ResourceTrackingPageLoadMetricsObserver::GetCountsForType( | |
| 30 const content::ResourceType type, | |
| 31 int64_t& started_count, | |
|
RyanSturm
2017/04/14 20:08:43
I think there is a style point against non-const r
Pete Williamson
2017/04/17 18:53:11
Done (Passing pointers instead of references).
| |
| 32 int64_t& completed_count) { | |
| 33 started_count = started_count_; | |
| 34 completed_count = completed_count_; | |
| 35 } | |
| 36 | |
| 37 } // namespace page_load_metrics | |
| OLD | NEW |