| 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 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_DATA_REDUCTION_PROXY_METRICS_
OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_DATA_REDUCTION_PROXY_METRICS_
OBSERVER_H_ |
| 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_DATA_REDUCTION_PROXY_METRICS_
OBSERVER_H_ | 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_DATA_REDUCTION_PROXY_METRICS_
OBSERVER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "components/page_load_metrics/browser/page_load_metrics_observer.h" | 9 #include "components/page_load_metrics/browser/page_load_metrics_observer.h" |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Observer responsible for recording core page load metrics releveant to | 30 // Observer responsible for recording core page load metrics releveant to |
| 31 // DataReductionProxy. | 31 // DataReductionProxy. |
| 32 class DataReductionProxyMetricsObserver | 32 class DataReductionProxyMetricsObserver |
| 33 : public page_load_metrics::PageLoadMetricsObserver { | 33 : public page_load_metrics::PageLoadMetricsObserver { |
| 34 public: | 34 public: |
| 35 DataReductionProxyMetricsObserver(); | 35 DataReductionProxyMetricsObserver(); |
| 36 ~DataReductionProxyMetricsObserver() override; | 36 ~DataReductionProxyMetricsObserver() override; |
| 37 | 37 |
| 38 // page_load_metrics::PageLoadMetricsObserver: | 38 // page_load_metrics::PageLoadMetricsObserver: |
| 39 void OnCommit(content::NavigationHandle* navigation_handle) override; | 39 void OnCommit(content::NavigationHandle* navigation_handle) override; |
| 40 void OnComplete(const page_load_metrics::PageLoadTiming& timing, | 40 void OnFirstContentfulPaint( |
| 41 const page_load_metrics::PageLoadExtraInfo& info) override; | |
| 42 | |
| 43 void RecordTimingHistograms( | |
| 44 const page_load_metrics::PageLoadTiming& timing, | 41 const page_load_metrics::PageLoadTiming& timing, |
| 45 const page_load_metrics::PageLoadExtraInfo& info) const; | 42 const page_load_metrics::PageLoadExtraInfo& info) override; |
| 46 | 43 |
| 47 private: | 44 private: |
| 48 // True if the navigation requested LoFi. | 45 // True if the navigation requested LoFi. |
| 49 bool lofi_requested_; | 46 bool lofi_requested_; |
| 50 | 47 |
| 51 // True if the navigation was proxied through the data reduction proxy. | 48 // True if the navigation was proxied through the data reduction proxy. |
| 52 bool used_data_reduction_proxy_; | 49 bool used_data_reduction_proxy_; |
| 53 | 50 |
| 54 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyMetricsObserver); | 51 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyMetricsObserver); |
| 55 }; | 52 }; |
| 56 | 53 |
| 57 } // namespace data_reduction_proxy | 54 } // namespace data_reduction_proxy |
| 58 | 55 |
| 59 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_DATA_REDUCTION_PROXY_METRI
CS_OBSERVER_H_ | 56 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_DATA_REDUCTION_PROXY_METRI
CS_OBSERVER_H_ |
| OLD | NEW |