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

Side by Side Diff: components/cronet/ios/cronet_environment.h

Issue 2644583002: Add configuration functions for HTTP cache type to Obj-C and C++ (Closed)
Patch Set: make enum more obj-c-compatible Created 3 years, 10 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
« no previous file with comments | « components/cronet/ios/Cronet.mm ('k') | components/cronet/ios/cronet_environment.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 void set_accept_language(const std::string& accept_language) { 81 void set_accept_language(const std::string& accept_language) {
82 accept_language_ = accept_language; 82 accept_language_ = accept_language;
83 } 83 }
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) {
91 http_cache_ = http_cache;
92 }
93
90 void SetHostResolverRules(const std::string& host_resolver_rules); 94 void SetHostResolverRules(const std::string& host_resolver_rules);
91 95
92 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) {
93 ssl_key_log_file_name_ = ssl_key_log_file_name; 97 ssl_key_log_file_name_ = ssl_key_log_file_name;
94 } 98 }
95 99
96 // Returns the URLRequestContext associated with this object. 100 // Returns the URLRequestContext associated with this object.
97 net::URLRequestContext* GetURLRequestContext() const; 101 net::URLRequestContext* GetURLRequestContext() const;
98 102
99 // Return the URLRequestContextGetter associated with this object. 103 // Return the URLRequestContextGetter associated with this object.
(...skipping 24 matching lines...) Expand all
124 void SetHostResolverRulesOnNetworkThread(const std::string& rules, 128 void SetHostResolverRulesOnNetworkThread(const std::string& rules,
125 base::WaitableEvent* event); 129 base::WaitableEvent* event);
126 130
127 std::string getDefaultQuicUserAgentId() const; 131 std::string getDefaultQuicUserAgentId() const;
128 132
129 bool http2_enabled_; 133 bool http2_enabled_;
130 bool quic_enabled_; 134 bool quic_enabled_;
131 std::string quic_user_agent_id_; 135 std::string quic_user_agent_id_;
132 std::string accept_language_; 136 std::string accept_language_;
133 std::string ssl_key_log_file_name_; 137 std::string ssl_key_log_file_name_;
138 URLRequestContextConfig::HttpCacheType http_cache_;
134 139
135 std::list<net::HostPortPair> quic_hints_; 140 std::list<net::HostPortPair> quic_hints_;
136 141
137 std::unique_ptr<base::Thread> network_io_thread_; 142 std::unique_ptr<base::Thread> network_io_thread_;
138 std::unique_ptr<base::Thread> network_cache_thread_; 143 std::unique_ptr<base::Thread> network_cache_thread_;
139 std::unique_ptr<base::Thread> file_thread_; 144 std::unique_ptr<base::Thread> file_thread_;
140 std::unique_ptr<base::Thread> file_user_blocking_thread_; 145 std::unique_ptr<base::Thread> file_user_blocking_thread_;
141 scoped_refptr<base::SequencedTaskRunner> pref_store_worker_pool_; 146 scoped_refptr<base::SequencedTaskRunner> pref_store_worker_pool_;
142 std::unique_ptr<net::CertVerifier> mock_cert_verifier_; 147 std::unique_ptr<net::CertVerifier> mock_cert_verifier_;
143 std::unique_ptr<net::CookieStore> cookie_store_; 148 std::unique_ptr<net::CookieStore> cookie_store_;
144 std::unique_ptr<net::URLRequestContext> main_context_; 149 std::unique_ptr<net::URLRequestContext> main_context_;
145 scoped_refptr<net::URLRequestContextGetter> main_context_getter_; 150 scoped_refptr<net::URLRequestContextGetter> main_context_getter_;
146 std::string user_agent_; 151 std::string user_agent_;
147 bool user_agent_partial_; 152 bool user_agent_partial_;
148 std::unique_ptr<net::NetLog> net_log_; 153 std::unique_ptr<net::NetLog> net_log_;
149 std::unique_ptr<net::WriteToFileNetLogObserver> net_log_observer_; 154 std::unique_ptr<net::WriteToFileNetLogObserver> net_log_observer_;
150 155
151 DISALLOW_COPY_AND_ASSIGN(CronetEnvironment); 156 DISALLOW_COPY_AND_ASSIGN(CronetEnvironment);
152 }; 157 };
153 158
154 } // namespace cronet 159 } // namespace cronet
155 160
156 #endif // COMPONENTS_CRONET_IOS_CRONET_ENVIRONMENT_H_ 161 #endif // COMPONENTS_CRONET_IOS_CRONET_ENVIRONMENT_H_
OLDNEW
« no previous file with comments | « components/cronet/ios/Cronet.mm ('k') | components/cronet/ios/cronet_environment.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698