Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 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_ | |
| 7 | |
| 8 #include "components/page_load_metrics/browser/page_load_metrics_observer.h" | |
| 9 | |
| 10 namespace content { | |
| 11 class NavigationHandle; | |
| 12 } | |
| 13 | |
| 14 namespace page_load_metrics { | |
| 15 struct PageLoadExtraInfo; | |
| 16 struct PageLoadTiming; | |
| 17 } | |
| 18 | |
| 19 namespace data_reduction_proxy { | |
| 20 | |
| 21 namespace internal { | |
| 22 extern const char kHistogramFirstContentfulPaintDataReductionProxy[]; | |
| 23 extern const char kHistogramFirstContentfulPaintDataReductionProxyAutoLofiOn[]; | |
| 24 extern const char kHistogramFirstContentfulPaintDataReductionProxyAutoLofiOff[]; | |
| 25 } | |
| 26 | |
| 27 class DataReductionProxyMetricsObserver | |
| 28 : public page_load_metrics::PageLoadMetricsObserver { | |
| 29 public: | |
| 30 DataReductionProxyMetricsObserver(); | |
| 31 ~DataReductionProxyMetricsObserver() override; | |
| 32 | |
| 33 // page_load_metrics::PageLoadMetricsObserver implementation: | |
| 34 void OnCommit(content::NavigationHandle* navigation_handle) override; | |
| 35 void OnComplete(const page_load_metrics::PageLoadTiming& timing, | |
| 36 const page_load_metrics::PageLoadExtraInfo& info) override; | |
| 37 | |
| 38 void RecordTimingHistograms(const page_load_metrics::PageLoadTiming& timing, | |
| 39 const page_load_metrics::PageLoadExtraInfo& info); | |
| 40 | |
| 41 private: | |
| 42 // True if the navigation used lofi. | |
| 43 bool is_using_lofi_; | |
| 44 | |
| 45 // True if the navigation was proxied through the data reduction proxy. | |
| 46 bool used_data_reduction_proxy_; | |
| 47 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyMetricsObserver); | |
|
tbansal1
2016/03/07 18:05:04
#include "base/macros.h"
RyanSturm
2016/03/08 19:47:42
Done.
| |
| 48 }; | |
| 49 | |
| 50 } // namespace data_reduction_proxy | |
| 51 | |
| 52 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_DATA_REDUCTION_PROXY_METRI CS_OBSERVER_H_ | |
| OLD | NEW |