| 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/optional.h" | 9 #include "base/optional.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 11 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| 12 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 12 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
| 13 #include "chrome/browser/page_load_metrics/page_load_metrics_observer.h" |
| 14 #include "chrome/browser/page_load_metrics/page_load_metrics_util.h" |
| 13 #include "chrome/browser/renderer_host/chrome_navigation_data.h" | 15 #include "chrome/browser/renderer_host/chrome_navigation_data.h" |
| 16 #include "chrome/common/page_load_metrics/page_load_timing.h" |
| 14 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data
.h" | 17 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data
.h" |
| 15 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_ping
back_client.h" | 18 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_ping
back_client.h" |
| 16 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv
ice.h" | 19 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv
ice.h" |
| 17 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_page_
load_timing.h" | 20 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_page_
load_timing.h" |
| 18 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" | 21 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" |
| 19 #include "components/page_load_metrics/browser/page_load_metrics_observer.h" | |
| 20 #include "components/page_load_metrics/browser/page_load_metrics_util.h" | |
| 21 #include "components/page_load_metrics/common/page_load_timing.h" | |
| 22 #include "content/public/browser/browser_context.h" | 22 #include "content/public/browser/browser_context.h" |
| 23 #include "content/public/browser/navigation_data.h" | 23 #include "content/public/browser/navigation_data.h" |
| 24 #include "content/public/browser/navigation_handle.h" | 24 #include "content/public/browser/navigation_handle.h" |
| 25 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
| 26 | 26 |
| 27 namespace data_reduction_proxy { | 27 namespace data_reduction_proxy { |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 bool ShouldRecordHistogram(const DataReductionProxyData* data, | 31 bool ShouldRecordHistogram(const DataReductionProxyData* data, |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 DataReductionProxyPingbackClient* | 213 DataReductionProxyPingbackClient* |
| 214 DataReductionProxyMetricsObserver::GetPingbackClient() const { | 214 DataReductionProxyMetricsObserver::GetPingbackClient() const { |
| 215 return DataReductionProxyChromeSettingsFactory::GetForBrowserContext( | 215 return DataReductionProxyChromeSettingsFactory::GetForBrowserContext( |
| 216 browser_context_) | 216 browser_context_) |
| 217 ->data_reduction_proxy_service() | 217 ->data_reduction_proxy_service() |
| 218 ->pingback_client(); | 218 ->pingback_client(); |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace data_reduction_proxy | 221 } // namespace data_reduction_proxy |
| OLD | NEW |