Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.h

Issue 2833523002: Adding opt out and previews type information to DRP pingback (Closed)
Patch Set: moved definition up Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_occured);
bengr 2017/04/20 01:02:33 spelling.
RyanSturm 2017/04/20 20:25:44 Done.
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
124 // The browser context this navigation is operating in. 125 // The browser context this navigation is operating in.
125 content::BrowserContext* browser_context_; 126 content::BrowserContext* browser_context_;
126 127
127 // The number of resources that used data reduction proxy. 128 // The number of resources that used data reduction proxy.
128 int num_data_reduction_proxy_resources_; 129 int num_data_reduction_proxy_resources_;
129 130
130 // The number of resources that did not come from cache. 131 // The number of resources that did not come from cache.
131 int num_network_resources_; 132 int num_network_resources_;
132 133
133 // The total content network bytes that the user would have downloaded if they 134 // The total content network bytes that the user would have downloaded if they
134 // were not using data reduction proxy. 135 // were not using data reduction proxy.
135 int64_t original_network_bytes_; 136 int64_t original_network_bytes_;
136 137
137 // The total network bytes loaded through data reduction proxy. 138 // The total network bytes loaded through data reduction proxy.
138 int64_t network_bytes_proxied_; 139 int64_t network_bytes_proxied_;
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
144 // A key that relates to the tab.
bengr 2017/04/20 17:36:18 relates how? uniquely identifies? why does the obs
RyanSturm 2017/04/20 20:25:44 Acknowledged.
145 void* tab_identifier_key_;
146
143 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyMetricsObserver); 147 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyMetricsObserver);
144 }; 148 };
145 149
146 } // namespace data_reduction_proxy 150 } // namespace data_reduction_proxy
147 151
148 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_DATA_REDUCTION_PROXY_METRI CS_OBSERVER_H_ 152 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_DATA_REDUCTION_PROXY_METRI CS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698