Chromium Code Reviews| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 94 void set_experimental_options(const std::string& experimental_options) { | 94 void set_experimental_options(const std::string& experimental_options) { |
| 95 experimental_options_ = experimental_options; | 95 experimental_options_ = experimental_options; |
| 96 } | 96 } |
| 97 | 97 |
| 98 void SetHostResolverRules(const std::string& host_resolver_rules); | 98 void SetHostResolverRules(const std::string& host_resolver_rules); |
| 99 | 99 |
| 100 void set_ssl_key_log_file_name(const std::string& ssl_key_log_file_name) { | 100 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; | 101 ssl_key_log_file_name_ = ssl_key_log_file_name; |
| 102 } | 102 } |
| 103 | 103 |
| 104 void set_pkp_list(ScopedVector<URLRequestContextConfig::Pkp> pkp_list) { | |
| 105 pkp_list_ = std::move(pkp_list); | |
| 106 } | |
| 107 | |
| 108 void add_public_key_pins(std::unique_ptr<URLRequestContextConfig::Pkp> pkp) { | |
|
lilyhoughton
2017/06/09 16:51:57
does not seem to be used anywhere currently
kapishnikov
2017/06/09 21:27:02
Removed.
| |
| 109 pkp_list_.push_back(std::move(pkp)); | |
| 110 } | |
| 111 | |
| 104 // Returns the URLRequestContext associated with this object. | 112 // Returns the URLRequestContext associated with this object. |
| 105 net::URLRequestContext* GetURLRequestContext() const; | 113 net::URLRequestContext* GetURLRequestContext() const; |
| 106 | 114 |
| 107 // Return the URLRequestContextGetter associated with this object. | 115 // Return the URLRequestContextGetter associated with this object. |
| 108 net::URLRequestContextGetter* GetURLRequestContextGetter() const; | 116 net::URLRequestContextGetter* GetURLRequestContextGetter() const; |
| 109 | 117 |
| 110 private: | 118 private: |
| 111 // Performs initialization tasks that must happen on the network thread. | 119 // Performs initialization tasks that must happen on the network thread. |
| 112 void InitializeOnNetworkThread(); | 120 void InitializeOnNetworkThread(); |
| 113 | 121 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 134 | 142 |
| 135 std::string getDefaultQuicUserAgentId() const; | 143 std::string getDefaultQuicUserAgentId() const; |
| 136 | 144 |
| 137 bool http2_enabled_; | 145 bool http2_enabled_; |
| 138 bool quic_enabled_; | 146 bool quic_enabled_; |
| 139 std::string quic_user_agent_id_; | 147 std::string quic_user_agent_id_; |
| 140 std::string accept_language_; | 148 std::string accept_language_; |
| 141 std::string experimental_options_; | 149 std::string experimental_options_; |
| 142 std::string ssl_key_log_file_name_; | 150 std::string ssl_key_log_file_name_; |
| 143 URLRequestContextConfig::HttpCacheType http_cache_; | 151 URLRequestContextConfig::HttpCacheType http_cache_; |
| 152 ScopedVector<URLRequestContextConfig::Pkp> pkp_list_; | |
| 144 | 153 |
| 145 std::list<net::HostPortPair> quic_hints_; | 154 std::list<net::HostPortPair> quic_hints_; |
| 146 | 155 |
| 147 std::unique_ptr<base::Thread> network_io_thread_; | 156 std::unique_ptr<base::Thread> network_io_thread_; |
| 148 std::unique_ptr<base::Thread> network_cache_thread_; | 157 std::unique_ptr<base::Thread> network_cache_thread_; |
| 149 std::unique_ptr<base::Thread> file_thread_; | 158 std::unique_ptr<base::Thread> file_thread_; |
| 150 std::unique_ptr<base::Thread> file_user_blocking_thread_; | 159 std::unique_ptr<base::Thread> file_user_blocking_thread_; |
| 151 scoped_refptr<base::SequencedTaskRunner> pref_store_worker_pool_; | 160 scoped_refptr<base::SequencedTaskRunner> pref_store_worker_pool_; |
| 152 std::unique_ptr<net::CertVerifier> mock_cert_verifier_; | 161 std::unique_ptr<net::CertVerifier> mock_cert_verifier_; |
| 153 std::unique_ptr<net::CookieStore> cookie_store_; | 162 std::unique_ptr<net::CookieStore> cookie_store_; |
| 154 std::unique_ptr<net::URLRequestContext> main_context_; | 163 std::unique_ptr<net::URLRequestContext> main_context_; |
| 155 scoped_refptr<net::URLRequestContextGetter> main_context_getter_; | 164 scoped_refptr<net::URLRequestContextGetter> main_context_getter_; |
| 156 std::string user_agent_; | 165 std::string user_agent_; |
| 157 bool user_agent_partial_; | 166 bool user_agent_partial_; |
| 158 std::unique_ptr<net::NetLog> net_log_; | 167 std::unique_ptr<net::NetLog> net_log_; |
| 159 std::unique_ptr<net::WriteToFileNetLogObserver> net_log_observer_; | 168 std::unique_ptr<net::WriteToFileNetLogObserver> net_log_observer_; |
| 160 | 169 |
| 161 DISALLOW_COPY_AND_ASSIGN(CronetEnvironment); | 170 DISALLOW_COPY_AND_ASSIGN(CronetEnvironment); |
| 162 }; | 171 }; |
| 163 | 172 |
| 164 } // namespace cronet | 173 } // namespace cronet |
| 165 | 174 |
| 166 #endif // COMPONENTS_CRONET_IOS_CRONET_ENVIRONMENT_H_ | 175 #endif // COMPONENTS_CRONET_IOS_CRONET_ENVIRONMENT_H_ |
| OLD | NEW |