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

Side by Side Diff: components/cronet/android/cronet_data_reduction_proxy.h

Issue 1725123005: Passing in a Data Reduction Proxy Delegate from Cronet with Data Reduction Proxy Enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated CL description Created 4 years, 9 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
« no previous file with comments | « no previous file | components/cronet/android/cronet_data_reduction_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_CRONET_ANDROID_CRONET_DATA_REDUCTION_PROXY_H_ 5 #ifndef COMPONENTS_CRONET_ANDROID_CRONET_DATA_REDUCTION_PROXY_H_
6 #define COMPONENTS_CRONET_ANDROID_CRONET_DATA_REDUCTION_PROXY_H_ 6 #define COMPONENTS_CRONET_ANDROID_CRONET_DATA_REDUCTION_PROXY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 13
14 class PrefService; 14 class PrefService;
15 15
16 namespace base { 16 namespace base {
17 class SingleThreadTaskRunner; 17 class SingleThreadTaskRunner;
18 } 18 }
19 19
20 namespace data_reduction_proxy { 20 namespace data_reduction_proxy {
21 class DataReductionProxyIOData; 21 class DataReductionProxyIOData;
22 class DataReductionProxySettings; 22 class DataReductionProxySettings;
23 } 23 }
24 24
25 namespace net { 25 namespace net {
26 class NetLog; 26 class NetLog;
27 class NetworkDelegate; 27 class NetworkDelegate;
28 class ProxyDelegate;
28 class URLRequestContext; 29 class URLRequestContext;
29 class URLRequestContextGetter; 30 class URLRequestContextGetter;
30 class URLRequestInterceptor; 31 class URLRequestInterceptor;
31 } 32 }
32 33
33 namespace cronet { 34 namespace cronet {
34 35
35 // Wrapper and configurator of Data Reduction Proxy objects for Cronet. It 36 // Wrapper and configurator of Data Reduction Proxy objects for Cronet. It
36 // configures the Data Reduction Proxy to run both its UI and IO classes on 37 // configures the Data Reduction Proxy to run both its UI and IO classes on
37 // Cronet's network thread. 38 // Cronet's network thread.
(...skipping 12 matching lines...) Expand all
50 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 51 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
51 net::NetLog* net_log); 52 net::NetLog* net_log);
52 53
53 ~CronetDataReductionProxy(); 54 ~CronetDataReductionProxy();
54 55
55 // Constructs a network delegate suitable for adding Data Reduction Proxy 56 // Constructs a network delegate suitable for adding Data Reduction Proxy
56 // request headers. 57 // request headers.
57 scoped_ptr<net::NetworkDelegate> CreateNetworkDelegate( 58 scoped_ptr<net::NetworkDelegate> CreateNetworkDelegate(
58 scoped_ptr<net::NetworkDelegate> wrapped_network_delegate); 59 scoped_ptr<net::NetworkDelegate> wrapped_network_delegate);
59 60
61 scoped_ptr<net::ProxyDelegate> CreateProxyDelegate();
mef 2016/02/29 15:38:56 could you add a comment?
62
60 // Constructs a URLRequestInterceptor suitable for carrying out the Data 63 // Constructs a URLRequestInterceptor suitable for carrying out the Data
61 // Reduction Proxy's bypass protocol. 64 // Reduction Proxy's bypass protocol.
62 scoped_ptr<net::URLRequestInterceptor> CreateInterceptor(); 65 scoped_ptr<net::URLRequestInterceptor> CreateInterceptor();
63 66
64 // Constructs a bridge between the Settings and IOData objects, sets up a 67 // Constructs a bridge between the Settings and IOData objects, sets up a
65 // context for secure proxy check requests, and enables the proxy, if 68 // context for secure proxy check requests, and enables the proxy, if
66 // |enable| is true. 69 // |enable| is true.
67 void Init(bool enable, net::URLRequestContext* context); 70 void Init(bool enable, net::URLRequestContext* context);
68 71
69 private: 72 private:
70 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 73 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
71 scoped_ptr<PrefService> prefs_; 74 scoped_ptr<PrefService> prefs_;
72 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; 75 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
73 scoped_ptr<data_reduction_proxy::DataReductionProxySettings> settings_; 76 scoped_ptr<data_reduction_proxy::DataReductionProxySettings> settings_;
74 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> io_data_; 77 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> io_data_;
75 78
76 DISALLOW_COPY_AND_ASSIGN(CronetDataReductionProxy); 79 DISALLOW_COPY_AND_ASSIGN(CronetDataReductionProxy);
77 }; 80 };
78 81
79 } // namespace cronet 82 } // namespace cronet
80 83
81 #endif // COMPONENTS_CRONET_ANDROID_CRONET_DATA_REDUCTION_PROXY_H_ 84 #endif // COMPONENTS_CRONET_ANDROID_CRONET_DATA_REDUCTION_PROXY_H_
OLDNEW
« no previous file with comments | « no previous file | components/cronet/android/cronet_data_reduction_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698