| OLD | NEW |
| 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 12 matching lines...) Expand all Loading... |
| 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 class SdchOwner; | 28 class SdchOwner; |
| 29 } // namespace net | 29 } // namespace net |
| 30 | 30 |
| 31 namespace cronet { | 31 namespace cronet { |
| 32 | 32 |
| 33 class CronetDataReductionProxy; |
| 33 struct URLRequestContextConfig; | 34 struct URLRequestContextConfig; |
| 34 | 35 |
| 35 bool CronetUrlRequestContextAdapterRegisterJni(JNIEnv* env); | 36 bool CronetUrlRequestContextAdapterRegisterJni(JNIEnv* env); |
| 36 | 37 |
| 37 // Adapter between Java CronetUrlRequestContext and net::URLRequestContext. | 38 // Adapter between Java CronetUrlRequestContext and net::URLRequestContext. |
| 38 class CronetURLRequestContextAdapter { | 39 class CronetURLRequestContextAdapter { |
| 39 public: | 40 public: |
| 40 explicit CronetURLRequestContextAdapter( | 41 explicit CronetURLRequestContextAdapter( |
| 41 scoped_ptr<URLRequestContextConfig> context_config); | 42 scoped_ptr<URLRequestContextConfig> context_config); |
| 42 | 43 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 scoped_ptr<net::ProxyConfigService> proxy_config_service_; | 97 scoped_ptr<net::ProxyConfigService> proxy_config_service_; |
| 97 scoped_ptr<net::SdchOwner> sdch_owner_; | 98 scoped_ptr<net::SdchOwner> sdch_owner_; |
| 98 | 99 |
| 99 // Context config is only valid untng context is initialized. | 100 // Context config is only valid untng context is initialized. |
| 100 scoped_ptr<URLRequestContextConfig> context_config_; | 101 scoped_ptr<URLRequestContextConfig> context_config_; |
| 101 | 102 |
| 102 // A queue of tasks that need to be run after context has been initialized. | 103 // A queue of tasks that need to be run after context has been initialized. |
| 103 std::queue<base::Closure> tasks_waiting_for_context_; | 104 std::queue<base::Closure> tasks_waiting_for_context_; |
| 104 bool is_context_initialized_; | 105 bool is_context_initialized_; |
| 105 int default_load_flags_; | 106 int default_load_flags_; |
| 107 scoped_ptr<CronetDataReductionProxy> data_reduction_proxy_; |
| 106 | 108 |
| 107 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestContextAdapter); | 109 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestContextAdapter); |
| 108 }; | 110 }; |
| 109 | 111 |
| 110 } // namespace cronet | 112 } // namespace cronet |
| 111 | 113 |
| 112 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_ | 114 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_ |
| OLD | NEW |