| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_IOS_CRONET_ENVIRONMENT_H_ | 5 #ifndef COMPONENTS_CRONET_IOS_CRONET_ENVIRONMENT_H_ |
| 6 #define COMPONENTS_CRONET_IOS_CRONET_ENVIRONMENT_H_ | 6 #define COMPONENTS_CRONET_IOS_CRONET_ENVIRONMENT_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 void set_mock_cert_verifier( | 85 void set_mock_cert_verifier( |
| 86 std::unique_ptr<net::CertVerifier> mock_cert_verifier) { | 86 std::unique_ptr<net::CertVerifier> mock_cert_verifier) { |
| 87 mock_cert_verifier_ = std::move(mock_cert_verifier); | 87 mock_cert_verifier_ = std::move(mock_cert_verifier); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void set_http_cache(URLRequestContextConfig::HttpCacheType http_cache) { | 90 void set_http_cache(URLRequestContextConfig::HttpCacheType http_cache) { |
| 91 http_cache_ = http_cache; | 91 http_cache_ = http_cache; |
| 92 } | 92 } |
| 93 | 93 |
| 94 void set_experimental_options(const std::string& experimental_options) { | |
| 95 experimental_options_ = experimental_options; | |
| 96 } | |
| 97 | |
| 98 void SetHostResolverRules(const std::string& host_resolver_rules); | 94 void SetHostResolverRules(const std::string& host_resolver_rules); |
| 99 | 95 |
| 100 void set_ssl_key_log_file_name(const std::string& ssl_key_log_file_name) { | 96 void set_ssl_key_log_file_name(const std::string& ssl_key_log_file_name) { |
| 101 ssl_key_log_file_name_ = ssl_key_log_file_name; | 97 ssl_key_log_file_name_ = ssl_key_log_file_name; |
| 102 } | 98 } |
| 103 | 99 |
| 104 // Returns the URLRequestContext associated with this object. | 100 // Returns the URLRequestContext associated with this object. |
| 105 net::URLRequestContext* GetURLRequestContext() const; | 101 net::URLRequestContext* GetURLRequestContext() const; |
| 106 | 102 |
| 107 // Return the URLRequestContextGetter associated with this object. | 103 // Return the URLRequestContextGetter associated with this object. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 131 // Sets host resolver rules on the network_io_thread_. | 127 // Sets host resolver rules on the network_io_thread_. |
| 132 void SetHostResolverRulesOnNetworkThread(const std::string& rules, | 128 void SetHostResolverRulesOnNetworkThread(const std::string& rules, |
| 133 base::WaitableEvent* event); | 129 base::WaitableEvent* event); |
| 134 | 130 |
| 135 std::string getDefaultQuicUserAgentId() const; | 131 std::string getDefaultQuicUserAgentId() const; |
| 136 | 132 |
| 137 bool http2_enabled_; | 133 bool http2_enabled_; |
| 138 bool quic_enabled_; | 134 bool quic_enabled_; |
| 139 std::string quic_user_agent_id_; | 135 std::string quic_user_agent_id_; |
| 140 std::string accept_language_; | 136 std::string accept_language_; |
| 141 std::string experimental_options_; | |
| 142 std::string ssl_key_log_file_name_; | 137 std::string ssl_key_log_file_name_; |
| 143 URLRequestContextConfig::HttpCacheType http_cache_; | 138 URLRequestContextConfig::HttpCacheType http_cache_; |
| 144 | 139 |
| 145 std::list<net::HostPortPair> quic_hints_; | 140 std::list<net::HostPortPair> quic_hints_; |
| 146 | 141 |
| 147 std::unique_ptr<base::Thread> network_io_thread_; | 142 std::unique_ptr<base::Thread> network_io_thread_; |
| 148 std::unique_ptr<base::Thread> network_cache_thread_; | 143 std::unique_ptr<base::Thread> network_cache_thread_; |
| 149 std::unique_ptr<base::Thread> file_thread_; | 144 std::unique_ptr<base::Thread> file_thread_; |
| 150 std::unique_ptr<base::Thread> file_user_blocking_thread_; | 145 std::unique_ptr<base::Thread> file_user_blocking_thread_; |
| 151 scoped_refptr<base::SequencedTaskRunner> pref_store_worker_pool_; | 146 scoped_refptr<base::SequencedTaskRunner> pref_store_worker_pool_; |
| 152 std::unique_ptr<net::CertVerifier> mock_cert_verifier_; | 147 std::unique_ptr<net::CertVerifier> mock_cert_verifier_; |
| 153 std::unique_ptr<net::CookieStore> cookie_store_; | 148 std::unique_ptr<net::CookieStore> cookie_store_; |
| 154 std::unique_ptr<net::URLRequestContext> main_context_; | 149 std::unique_ptr<net::URLRequestContext> main_context_; |
| 155 scoped_refptr<net::URLRequestContextGetter> main_context_getter_; | 150 scoped_refptr<net::URLRequestContextGetter> main_context_getter_; |
| 156 std::string user_agent_; | 151 std::string user_agent_; |
| 157 bool user_agent_partial_; | 152 bool user_agent_partial_; |
| 158 std::unique_ptr<net::NetLog> net_log_; | 153 std::unique_ptr<net::NetLog> net_log_; |
| 159 std::unique_ptr<net::WriteToFileNetLogObserver> net_log_observer_; | 154 std::unique_ptr<net::WriteToFileNetLogObserver> net_log_observer_; |
| 160 | 155 |
| 161 DISALLOW_COPY_AND_ASSIGN(CronetEnvironment); | 156 DISALLOW_COPY_AND_ASSIGN(CronetEnvironment); |
| 162 }; | 157 }; |
| 163 | 158 |
| 164 } // namespace cronet | 159 } // namespace cronet |
| 165 | 160 |
| 166 #endif // COMPONENTS_CRONET_IOS_CRONET_ENVIRONMENT_H_ | 161 #endif // COMPONENTS_CRONET_IOS_CRONET_ENVIRONMENT_H_ |
| OLD | NEW |