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

Side by Side Diff: chrome/browser/net/chrome_network_delegate.h

Issue 473723002: Update data reduction proxy statistics prefs less often on desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tooManyWritesPatch
Patch Set: Addressed bengr comments Created 6 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_NET_CHROME_NETWORK_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
6 #define CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ 6 #define CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 namespace chrome_browser_net { 33 namespace chrome_browser_net {
34 class ConnectInterceptor; 34 class ConnectInterceptor;
35 class Predictor; 35 class Predictor;
36 } 36 }
37 37
38 namespace data_reduction_proxy { 38 namespace data_reduction_proxy {
39 class DataReductionProxyAuthRequestHandler; 39 class DataReductionProxyAuthRequestHandler;
40 class DataReductionProxyParams; 40 class DataReductionProxyParams;
41 class DataReductionProxyStatisticsPrefs;
41 class DataReductionProxyUsageStats; 42 class DataReductionProxyUsageStats;
42 } 43 } // namespace data_reduction_proxy
43 44
44 namespace domain_reliability { 45 namespace domain_reliability {
45 class DomainReliabilityMonitor; 46 class DomainReliabilityMonitor;
46 } // namespace domain_reliability 47 } // namespace domain_reliability
47 48
48 namespace extensions { 49 namespace extensions {
49 class EventRouterForwarder; 50 class EventRouterForwarder;
50 class InfoMap; 51 class InfoMap;
51 } 52 }
52 53
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 data_reduction_proxy_usage_stats_ = usage_stats; 160 data_reduction_proxy_usage_stats_ = usage_stats;
160 } 161 }
161 162
162 // |data_reduction_proxy_auth_request_handler_| must outlive this 163 // |data_reduction_proxy_auth_request_handler_| must outlive this
163 // ChromeNetworkDelegate. 164 // ChromeNetworkDelegate.
164 void set_data_reduction_proxy_auth_request_handler( 165 void set_data_reduction_proxy_auth_request_handler(
165 data_reduction_proxy::DataReductionProxyAuthRequestHandler* handler) { 166 data_reduction_proxy::DataReductionProxyAuthRequestHandler* handler) {
166 data_reduction_proxy_auth_request_handler_ = handler; 167 data_reduction_proxy_auth_request_handler_ = handler;
167 } 168 }
168 169
170 // |statistics_prefs_| must outlive this ChromeNetworkDelegate.
171 void set_data_reduction_proxy_statistics_prefs(
172 data_reduction_proxy::DataReductionProxyStatisticsPrefs* service) {
173 statistics_prefs_ = service;
174 }
175
169 void set_on_resolve_proxy_handler(OnResolveProxyHandler handler) { 176 void set_on_resolve_proxy_handler(OnResolveProxyHandler handler) {
170 on_resolve_proxy_handler_ = handler; 177 on_resolve_proxy_handler_ = handler;
171 } 178 }
172 179
173 void set_proxy_config_getter(const ProxyConfigGetter& getter) { 180 void set_proxy_config_getter(const ProxyConfigGetter& getter) {
174 proxy_config_getter_ = getter; 181 proxy_config_getter_ = getter;
175 } 182 }
176 183
177 // Adds the Client Hints header to HTTP requests. 184 // Adds the Client Hints header to HTTP requests.
178 void SetEnableClientHints(); 185 void SetEnableClientHints();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 prerender::PrerenderTracker* prerender_tracker_; 319 prerender::PrerenderTracker* prerender_tracker_;
313 320
314 // |data_reduction_proxy_params_| must outlive this ChromeNetworkDelegate. 321 // |data_reduction_proxy_params_| must outlive this ChromeNetworkDelegate.
315 data_reduction_proxy::DataReductionProxyParams* data_reduction_proxy_params_; 322 data_reduction_proxy::DataReductionProxyParams* data_reduction_proxy_params_;
316 // |data_reduction_proxy_usage_stats_| must outlive this 323 // |data_reduction_proxy_usage_stats_| must outlive this
317 // ChromeNetworkDelegate. 324 // ChromeNetworkDelegate.
318 data_reduction_proxy::DataReductionProxyUsageStats* 325 data_reduction_proxy::DataReductionProxyUsageStats*
319 data_reduction_proxy_usage_stats_; 326 data_reduction_proxy_usage_stats_;
320 data_reduction_proxy::DataReductionProxyAuthRequestHandler* 327 data_reduction_proxy::DataReductionProxyAuthRequestHandler*
321 data_reduction_proxy_auth_request_handler_; 328 data_reduction_proxy_auth_request_handler_;
329 data_reduction_proxy::DataReductionProxyStatisticsPrefs* statistics_prefs_;
322 330
323 OnResolveProxyHandler on_resolve_proxy_handler_; 331 OnResolveProxyHandler on_resolve_proxy_handler_;
324 ProxyConfigGetter proxy_config_getter_; 332 ProxyConfigGetter proxy_config_getter_;
325 333
326 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); 334 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate);
327 }; 335 };
328 336
329 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ 337 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698