| 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_URL_REQUEST_CONTEXT_ADAPTER_H_ | 5 #ifndef COMPONENTS_CRONET_ANDROID_URL_REQUEST_CONTEXT_ADAPTER_H_ |
| 6 #define COMPONENTS_CRONET_ANDROID_URL_REQUEST_CONTEXT_ADAPTER_H_ | 6 #define COMPONENTS_CRONET_ANDROID_URL_REQUEST_CONTEXT_ADAPTER_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 scoped_ptr<net::URLRequestContext> context_; | 91 scoped_ptr<net::URLRequestContext> context_; |
| 92 std::string user_agent_; | 92 std::string user_agent_; |
| 93 base::Thread* network_thread_; | 93 base::Thread* network_thread_; |
| 94 scoped_ptr<NetLogObserver> net_log_observer_; | 94 scoped_ptr<NetLogObserver> net_log_observer_; |
| 95 scoped_ptr<net::NetLogLogger> net_log_logger_; | 95 scoped_ptr<net::NetLogLogger> net_log_logger_; |
| 96 scoped_ptr<net::ProxyConfigService> proxy_config_service_; | 96 scoped_ptr<net::ProxyConfigService> proxy_config_service_; |
| 97 scoped_ptr<URLRequestContextConfig> config_; | 97 scoped_ptr<URLRequestContextConfig> config_; |
| 98 | 98 |
| 99 // A queue of tasks that need to be run after context has been initialized. | 99 // A queue of tasks that need to be run after context has been initialized. |
| 100 std::queue<RunAfterContextInitTask> tasks_waiting_for_context_; | 100 std::queue<RunAfterContextInitTask> tasks_waiting_for_context_; |
| 101 bool is_context_initialized_ = false; | 101 bool is_context_initialized_; |
| 102 | 102 |
| 103 virtual ~URLRequestContextAdapter(); | 103 virtual ~URLRequestContextAdapter(); |
| 104 | 104 |
| 105 // Initializes |context_| on the Network thread. | 105 // Initializes |context_| on the Network thread. |
| 106 void InitRequestContextOnNetworkThread(); | 106 void InitRequestContextOnNetworkThread(); |
| 107 | 107 |
| 108 // Helper function to start writing NetLog data to file. This should only be | 108 // Helper function to start writing NetLog data to file. This should only be |
| 109 // run after context is initialized. | 109 // run after context is initialized. |
| 110 void StartNetLogToFileHelper(const std::string& file_name); | 110 void StartNetLogToFileHelper(const std::string& file_name); |
| 111 // Helper function to stop writing NetLog data to file. This should only be | 111 // Helper function to stop writing NetLog data to file. This should only be |
| 112 // run after context is initialized. | 112 // run after context is initialized. |
| 113 void StopNetLogHelper(); | 113 void StopNetLogHelper(); |
| 114 | 114 |
| 115 DISALLOW_COPY_AND_ASSIGN(URLRequestContextAdapter); | 115 DISALLOW_COPY_AND_ASSIGN(URLRequestContextAdapter); |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 } // namespace cronet | 118 } // namespace cronet |
| 119 | 119 |
| 120 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_CONTEXT_ADAPTER_H_ | 120 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_CONTEXT_ADAPTER_H_ |
| OLD | NEW |