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

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

Issue 775773002: Add data reduction proxy debug info to net-internals#bandwidth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metr ics.h" 16 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metr ics.h"
17 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event _store.h"
17 #include "net/base/network_delegate.h" 18 #include "net/base/network_delegate.h"
18 #include "net/proxy/proxy_retry_info.h" 19 #include "net/proxy/proxy_retry_info.h"
19 20
20 class ChromeExtensionsNetworkDelegate; 21 class ChromeExtensionsNetworkDelegate;
21 class ClientHints; 22 class ClientHints;
22 class CookieSettings; 23 class CookieSettings;
23 class PrefService; 24 class PrefService;
24 25
25 template<class T> class PrefMember; 26 template<class T> class PrefMember;
26 27
27 typedef PrefMember<bool> BooleanPrefMember; 28 typedef PrefMember<bool> BooleanPrefMember;
28 29
29 namespace base { 30 namespace base {
30 class Value; 31 class Value;
31 } 32 }
32 33
33 namespace chrome_browser_net { 34 namespace chrome_browser_net {
34 class ConnectInterceptor; 35 class ConnectInterceptor;
35 class Predictor; 36 class Predictor;
36 } 37 }
37 38
38 namespace data_reduction_proxy { 39 namespace data_reduction_proxy {
39 class DataReductionProxyAuthRequestHandler; 40 class DataReductionProxyAuthRequestHandler;
41 class DataReductionProxyEventStore;
bengr 2014/12/02 23:55:32 Please coordinate with megjablon@, who is refactor
jeremyim 2014/12/03 08:10:36 Acknowledged.
40 class DataReductionProxyParams; 42 class DataReductionProxyParams;
41 class DataReductionProxyStatisticsPrefs; 43 class DataReductionProxyStatisticsPrefs;
42 class DataReductionProxyUsageStats; 44 class DataReductionProxyUsageStats;
43 } 45 }
44 46
45 namespace domain_reliability { 47 namespace domain_reliability {
46 class DomainReliabilityMonitor; 48 class DomainReliabilityMonitor;
47 } 49 }
48 50
49 namespace extensions { 51 namespace extensions {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 183 }
182 184
183 // |data_reduction_proxy_statistics_prefs_| must outlive this 185 // |data_reduction_proxy_statistics_prefs_| must outlive this
184 // ChromeNetworkDelegate. 186 // ChromeNetworkDelegate.
185 void set_data_reduction_proxy_statistics_prefs( 187 void set_data_reduction_proxy_statistics_prefs(
186 data_reduction_proxy::DataReductionProxyStatisticsPrefs* 188 data_reduction_proxy::DataReductionProxyStatisticsPrefs*
187 statistics_prefs) { 189 statistics_prefs) {
188 data_reduction_proxy_statistics_prefs_ = statistics_prefs; 190 data_reduction_proxy_statistics_prefs_ = statistics_prefs;
189 } 191 }
190 192
193 // |data_reduction_proxy_event_store_| must outlive this
194 // ChromeNetworkDelegate.
195 void set_data_reduction_proxy_event_store(
196 data_reduction_proxy::DataReductionProxyEventStore*
197 event_store) {
bengr 2014/12/02 23:55:32 Move to previous line.
jeremyim 2014/12/03 08:10:36 Done.
198 data_reduction_proxy_event_store_ = event_store;
199 }
200
191 void set_on_resolve_proxy_handler(OnResolveProxyHandler handler) { 201 void set_on_resolve_proxy_handler(OnResolveProxyHandler handler) {
192 on_resolve_proxy_handler_ = handler; 202 on_resolve_proxy_handler_ = handler;
193 } 203 }
194 204
195 void set_proxy_config_getter(const ProxyConfigGetter& getter) { 205 void set_proxy_config_getter(const ProxyConfigGetter& getter) {
196 proxy_config_getter_ = getter; 206 proxy_config_getter_ = getter;
197 } 207 }
198 208
199 // Adds the Client Hints header to HTTP requests. 209 // Adds the Client Hints header to HTTP requests.
200 void SetEnableClientHints(); 210 void SetEnableClientHints();
(...skipping 19 matching lines...) Expand all
220 230
221 // Creates a Value summary of the persistent state of the network session. 231 // Creates a Value summary of the persistent state of the network session.
222 // The caller is responsible for deleting the returned value. 232 // The caller is responsible for deleting the returned value.
223 // Must be called on the UI thread. 233 // Must be called on the UI thread.
224 static base::Value* HistoricNetworkStatsInfoToValue(PrefService* prefs); 234 static base::Value* HistoricNetworkStatsInfoToValue(PrefService* prefs);
225 235
226 // Creates a Value summary of the state of the network session. The caller is 236 // Creates a Value summary of the state of the network session. The caller is
227 // responsible for deleting the returned value. 237 // responsible for deleting the returned value.
228 base::Value* SessionNetworkStatsInfoToValue() const; 238 base::Value* SessionNetworkStatsInfoToValue() const;
229 239
240 // Creates a Value summary of data reduction proxy related information. The
bengr 2014/12/02 23:55:32 Please detail what is included in this summary.
jeremyim 2014/12/03 08:10:36 Done.
241 // caller is responsible for deleting the returned value.
242 base::Value* DataReductionProxyInfoToValue() const;
243
230 private: 244 private:
231 friend class ChromeNetworkDelegateTest; 245 friend class ChromeNetworkDelegateTest;
232 246
233 // NetworkDelegate implementation. 247 // NetworkDelegate implementation.
234 int OnBeforeURLRequest(net::URLRequest* request, 248 int OnBeforeURLRequest(net::URLRequest* request,
235 const net::CompletionCallback& callback, 249 const net::CompletionCallback& callback,
236 GURL* new_url) override; 250 GURL* new_url) override;
237 void OnResolveProxy(const GURL& url, 251 void OnResolveProxy(const GURL& url,
238 int load_flags, 252 int load_flags,
239 const net::ProxyService& proxy_service, 253 const net::ProxyService& proxy_service,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 // |data_reduction_proxy_params_| must outlive this ChromeNetworkDelegate. 350 // |data_reduction_proxy_params_| must outlive this ChromeNetworkDelegate.
337 data_reduction_proxy::DataReductionProxyParams* data_reduction_proxy_params_; 351 data_reduction_proxy::DataReductionProxyParams* data_reduction_proxy_params_;
338 // |data_reduction_proxy_usage_stats_| must outlive this 352 // |data_reduction_proxy_usage_stats_| must outlive this
339 // ChromeNetworkDelegate. 353 // ChromeNetworkDelegate.
340 data_reduction_proxy::DataReductionProxyUsageStats* 354 data_reduction_proxy::DataReductionProxyUsageStats*
341 data_reduction_proxy_usage_stats_; 355 data_reduction_proxy_usage_stats_;
342 data_reduction_proxy::DataReductionProxyAuthRequestHandler* 356 data_reduction_proxy::DataReductionProxyAuthRequestHandler*
343 data_reduction_proxy_auth_request_handler_; 357 data_reduction_proxy_auth_request_handler_;
344 data_reduction_proxy::DataReductionProxyStatisticsPrefs* 358 data_reduction_proxy::DataReductionProxyStatisticsPrefs*
345 data_reduction_proxy_statistics_prefs_; 359 data_reduction_proxy_statistics_prefs_;
360 // |data_reduction_proxy_event_store_| must outlive this
361 // ChromeNetworkDelegate.
362 data_reduction_proxy::DataReductionProxyEventStore*
363 data_reduction_proxy_event_store_;
346 364
347 OnResolveProxyHandler on_resolve_proxy_handler_; 365 OnResolveProxyHandler on_resolve_proxy_handler_;
348 ProxyConfigGetter proxy_config_getter_; 366 ProxyConfigGetter proxy_config_getter_;
349 367
350 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); 368 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate);
351 }; 369 };
352 370
353 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ 371 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/chrome_network_delegate.cc » ('j') | chrome/browser/net/chrome_network_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698