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

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

Issue 1112513003: Put Data Reduction Proxy support in Cronet behind a gyp flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cronet
Patch Set: Created 5 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_URL_REQUEST_CONTEXT_ADAPTER_H_ 5 #ifndef COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_
6 #define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_ 6 #define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 11 matching lines...) Expand all
22 } // namespace base 22 } // namespace base
23 23
24 namespace net { 24 namespace net {
25 class WriteToFileNetLogObserver; 25 class WriteToFileNetLogObserver;
26 class URLRequestContext; 26 class URLRequestContext;
27 class ProxyConfigService; 27 class ProxyConfigService;
28 } // namespace net 28 } // namespace net
29 29
30 namespace cronet { 30 namespace cronet {
31 31
32 #if defined(DATA_REDUCTION_PROXY_SUPPORT)
32 class CronetDataReductionProxy; 33 class CronetDataReductionProxy;
34 #endif
35
33 struct URLRequestContextConfig; 36 struct URLRequestContextConfig;
34 37
35 bool CronetUrlRequestContextAdapterRegisterJni(JNIEnv* env); 38 bool CronetUrlRequestContextAdapterRegisterJni(JNIEnv* env);
36 39
37 // Adapter between Java CronetUrlRequestContext and net::URLRequestContext. 40 // Adapter between Java CronetUrlRequestContext and net::URLRequestContext.
38 class CronetURLRequestContextAdapter { 41 class CronetURLRequestContextAdapter {
39 public: 42 public:
40 explicit CronetURLRequestContextAdapter( 43 explicit CronetURLRequestContextAdapter(
41 scoped_ptr<URLRequestContextConfig> context_config); 44 scoped_ptr<URLRequestContextConfig> context_config);
42 45
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 scoped_ptr<net::URLRequestContext> context_; 95 scoped_ptr<net::URLRequestContext> context_;
93 scoped_ptr<net::ProxyConfigService> proxy_config_service_; 96 scoped_ptr<net::ProxyConfigService> proxy_config_service_;
94 97
95 // Context config is only valid untng context is initialized. 98 // Context config is only valid untng context is initialized.
96 scoped_ptr<URLRequestContextConfig> context_config_; 99 scoped_ptr<URLRequestContextConfig> context_config_;
97 100
98 // A queue of tasks that need to be run after context has been initialized. 101 // A queue of tasks that need to be run after context has been initialized.
99 std::queue<base::Closure> tasks_waiting_for_context_; 102 std::queue<base::Closure> tasks_waiting_for_context_;
100 bool is_context_initialized_; 103 bool is_context_initialized_;
101 int default_load_flags_; 104 int default_load_flags_;
105
106 #if defined(DATA_REDUCTION_PROXY_SUPPORT)
102 scoped_ptr<CronetDataReductionProxy> data_reduction_proxy_; 107 scoped_ptr<CronetDataReductionProxy> data_reduction_proxy_;
108 #endif
103 109
104 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestContextAdapter); 110 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestContextAdapter);
105 }; 111 };
106 112
107 } // namespace cronet 113 } // namespace cronet
108 114
109 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_ 115 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698