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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 void OnParseStart(const page_load_metrics::PageLoadTiming& timing, | 103 void OnParseStart(const page_load_metrics::PageLoadTiming& timing, |
104 const page_load_metrics::PageLoadExtraInfo& info) override; | 104 const page_load_metrics::PageLoadExtraInfo& info) override; |
105 void OnParseStop(const page_load_metrics::PageLoadTiming& timing, | 105 void OnParseStop(const page_load_metrics::PageLoadTiming& timing, |
106 const page_load_metrics::PageLoadExtraInfo& info) override; | 106 const page_load_metrics::PageLoadExtraInfo& info) override; |
107 void OnLoadedResource( | 107 void OnLoadedResource( |
108 const page_load_metrics::ExtraRequestInfo& extra_request_info) override; | 108 const page_load_metrics::ExtraRequestInfo& extra_request_info) override; |
109 | 109 |
110 private: | 110 private: |
111 // Sends the page load information to the pingback client. | 111 // Sends the page load information to the pingback client. |
112 void SendPingback(const page_load_metrics::PageLoadTiming& timing, | 112 void SendPingback(const page_load_metrics::PageLoadTiming& timing, |
113 const page_load_metrics::PageLoadExtraInfo& info); | 113 const page_load_metrics::PageLoadExtraInfo& info, |
| 114 bool app_background_occurred); |
114 | 115 |
115 // Records UMA of page size when the observer is about to be deleted. | 116 // Records UMA of page size when the observer is about to be deleted. |
116 void RecordPageSizeUMA() const; | 117 void RecordPageSizeUMA() const; |
117 | 118 |
118 // Gets the default DataReductionProxyPingbackClient. Overridden in testing. | 119 // Gets the default DataReductionProxyPingbackClient. Overridden in testing. |
119 virtual DataReductionProxyPingbackClient* GetPingbackClient() const; | 120 virtual DataReductionProxyPingbackClient* GetPingbackClient() const; |
120 | 121 |
121 // Data related to this navigation. | 122 // Data related to this navigation. |
122 std::unique_ptr<DataReductionProxyData> data_; | 123 std::unique_ptr<DataReductionProxyData> data_; |
123 | 124 |
(...skipping 15 matching lines...) Expand all Loading... |
139 | 140 |
140 // The total network bytes used. | 141 // The total network bytes used. |
141 int64_t network_bytes_; | 142 int64_t network_bytes_; |
142 | 143 |
143 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyMetricsObserver); | 144 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyMetricsObserver); |
144 }; | 145 }; |
145 | 146 |
146 } // namespace data_reduction_proxy | 147 } // namespace data_reduction_proxy |
147 | 148 |
148 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_DATA_REDUCTION_PROXY_METRI
CS_OBSERVER_H_ | 149 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_DATA_REDUCTION_PROXY_METRI
CS_OBSERVER_H_ |
OLD | NEW |