| 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 #include "chrome/browser/page_load_metrics/observers/data_reduction_proxy_metric
s_observer.h" | 5 #include "chrome/browser/page_load_metrics/observers/data_reduction_proxy_metric
s_observer.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/optional.h" | 10 #include "base/optional.h" |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 } | 319 } |
| 320 if (WasStartedInForegroundOptionalEventInForeground(timing.parse_stop, | 320 if (WasStartedInForegroundOptionalEventInForeground(timing.parse_stop, |
| 321 info)) { | 321 info)) { |
| 322 parse_stop = timing.parse_stop; | 322 parse_stop = timing.parse_stop; |
| 323 } | 323 } |
| 324 | 324 |
| 325 DataReductionProxyPageLoadTiming data_reduction_proxy_timing( | 325 DataReductionProxyPageLoadTiming data_reduction_proxy_timing( |
| 326 timing.navigation_start, response_start, load_event_start, | 326 timing.navigation_start, response_start, load_event_start, |
| 327 first_image_paint, first_contentful_paint, | 327 first_image_paint, first_contentful_paint, |
| 328 experimental_first_meaningful_paint, | 328 experimental_first_meaningful_paint, |
| 329 parse_blocked_on_script_load_duration, parse_stop); | 329 parse_blocked_on_script_load_duration, parse_stop, network_bytes_, |
| 330 original_network_bytes_); |
| 330 GetPingbackClient()->SendPingback(*data_, data_reduction_proxy_timing); | 331 GetPingbackClient()->SendPingback(*data_, data_reduction_proxy_timing); |
| 331 } | 332 } |
| 332 | 333 |
| 333 void DataReductionProxyMetricsObserver::OnDomContentLoadedEventStart( | 334 void DataReductionProxyMetricsObserver::OnDomContentLoadedEventStart( |
| 334 const page_load_metrics::PageLoadTiming& timing, | 335 const page_load_metrics::PageLoadTiming& timing, |
| 335 const page_load_metrics::PageLoadExtraInfo& info) { | 336 const page_load_metrics::PageLoadExtraInfo& info) { |
| 336 RECORD_HISTOGRAMS_FOR_SUFFIX( | 337 RECORD_HISTOGRAMS_FOR_SUFFIX( |
| 337 data_, timing.dom_content_loaded_event_start.value(), | 338 data_, timing.dom_content_loaded_event_start.value(), |
| 338 internal::kHistogramDOMContentLoadedEventFiredSuffix); | 339 internal::kHistogramDOMContentLoadedEventFiredSuffix); |
| 339 } | 340 } |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 | 422 |
| 422 DataReductionProxyPingbackClient* | 423 DataReductionProxyPingbackClient* |
| 423 DataReductionProxyMetricsObserver::GetPingbackClient() const { | 424 DataReductionProxyMetricsObserver::GetPingbackClient() const { |
| 424 return DataReductionProxyChromeSettingsFactory::GetForBrowserContext( | 425 return DataReductionProxyChromeSettingsFactory::GetForBrowserContext( |
| 425 browser_context_) | 426 browser_context_) |
| 426 ->data_reduction_proxy_service() | 427 ->data_reduction_proxy_service() |
| 427 ->pingback_client(); | 428 ->pingback_client(); |
| 428 } | 429 } |
| 429 | 430 |
| 430 } // namespace data_reduction_proxy | 431 } // namespace data_reduction_proxy |
| OLD | NEW |