Chromium Code Reviews| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 271 } | 271 } |
| 272 | 272 |
| 273 void DataReductionProxyMetricsObserver::SendPingback( | 273 void DataReductionProxyMetricsObserver::SendPingback( |
| 274 const page_load_metrics::mojom::PageLoadTiming& timing, | 274 const page_load_metrics::mojom::PageLoadTiming& timing, |
| 275 const page_load_metrics::PageLoadExtraInfo& info, | 275 const page_load_metrics::PageLoadExtraInfo& info, |
| 276 bool app_background_occurred) { | 276 bool app_background_occurred) { |
| 277 // TODO(ryansturm): Move to OnFirstBackgroundEvent to handle some fast | 277 // TODO(ryansturm): Move to OnFirstBackgroundEvent to handle some fast |
| 278 // shutdown cases. crbug.com/618072 | 278 // shutdown cases. crbug.com/618072 |
| 279 if (!browser_context_ || !data_) | 279 if (!browser_context_ || !data_) |
| 280 return; | 280 return; |
| 281 if (data_reduction_proxy::params::IsIncludedInHoldbackFieldTrial() || | 281 if (data_reduction_proxy::params::IsIncludedInTamperDetectionExperiment()) { |
|
buettner
2017/06/09 17:20:35
We turned down tamper detection on the server long
tbansal1
2017/06/09 17:32:29
https://bugs.chromium.org/p/chromium/issues/detail
RyanSturm
2017/06/09 19:40:19
Done.
| |
| 282 data_reduction_proxy::params::IsIncludedInTamperDetectionExperiment()) { | |
| 283 return; | 282 return; |
| 284 } | 283 } |
| 285 // Only consider timing events that happened before the first background | 284 // Only consider timing events that happened before the first background |
|
tbansal1
2017/06/09 17:32:29
unrelated but can we add a DCHECK that url() is ht
RyanSturm
2017/06/09 19:40:19
Added one above for checking something related.
| |
| 286 // event. | 285 // event. |
| 287 base::Optional<base::TimeDelta> response_start; | 286 base::Optional<base::TimeDelta> response_start; |
| 288 base::Optional<base::TimeDelta> load_event_start; | 287 base::Optional<base::TimeDelta> load_event_start; |
| 289 base::Optional<base::TimeDelta> first_image_paint; | 288 base::Optional<base::TimeDelta> first_image_paint; |
| 290 base::Optional<base::TimeDelta> first_contentful_paint; | 289 base::Optional<base::TimeDelta> first_contentful_paint; |
| 291 base::Optional<base::TimeDelta> experimental_first_meaningful_paint; | 290 base::Optional<base::TimeDelta> experimental_first_meaningful_paint; |
| 292 base::Optional<base::TimeDelta> parse_blocked_on_script_load_duration; | 291 base::Optional<base::TimeDelta> parse_blocked_on_script_load_duration; |
| 293 base::Optional<base::TimeDelta> parse_stop; | 292 base::Optional<base::TimeDelta> parse_stop; |
| 294 if (WasStartedInForegroundOptionalEventInForeground(timing.response_start, | 293 if (WasStartedInForegroundOptionalEventInForeground(timing.response_start, |
| 295 info)) { | 294 info)) { |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 444 | 443 |
| 445 DataReductionProxyPingbackClient* | 444 DataReductionProxyPingbackClient* |
| 446 DataReductionProxyMetricsObserver::GetPingbackClient() const { | 445 DataReductionProxyMetricsObserver::GetPingbackClient() const { |
| 447 return DataReductionProxyChromeSettingsFactory::GetForBrowserContext( | 446 return DataReductionProxyChromeSettingsFactory::GetForBrowserContext( |
| 448 browser_context_) | 447 browser_context_) |
| 449 ->data_reduction_proxy_service() | 448 ->data_reduction_proxy_service() |
| 450 ->pingback_client(); | 449 ->pingback_client(); |
| 451 } | 450 } |
| 452 | 451 |
| 453 } // namespace data_reduction_proxy | 452 } // namespace data_reduction_proxy |
| OLD | NEW |