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

Side by Side Diff: ios/chrome/browser/ios_chrome_io_thread.h

Issue 1862193002: Enable QUIC for proxies only when QUIC is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed sclittle comments Created 4 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IOS_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_ 5 #ifndef IOS_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_
6 #define IOS_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_ 6 #define IOS_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 Optional<bool> enable_spdy31; 138 Optional<bool> enable_spdy31;
139 Optional<bool> enable_http2; 139 Optional<bool> enable_http2;
140 Optional<bool> parse_alternative_services; 140 Optional<bool> parse_alternative_services;
141 Optional<bool> enable_alternative_service_with_different_host; 141 Optional<bool> enable_alternative_service_with_different_host;
142 142
143 Optional<bool> enable_npn; 143 Optional<bool> enable_npn;
144 144
145 Optional<bool> enable_priority_dependencies; 145 Optional<bool> enable_priority_dependencies;
146 146
147 Optional<bool> enable_quic; 147 Optional<bool> enable_quic;
148 Optional<bool> enable_quic_for_proxies;
149 Optional<bool> quic_always_require_handshake_confirmation; 148 Optional<bool> quic_always_require_handshake_confirmation;
150 Optional<bool> quic_disable_connection_pooling; 149 Optional<bool> quic_disable_connection_pooling;
151 Optional<float> quic_load_server_info_timeout_srtt_multiplier; 150 Optional<float> quic_load_server_info_timeout_srtt_multiplier;
152 Optional<bool> quic_enable_connection_racing; 151 Optional<bool> quic_enable_connection_racing;
153 Optional<bool> quic_enable_non_blocking_io; 152 Optional<bool> quic_enable_non_blocking_io;
154 Optional<bool> quic_disable_disk_cache; 153 Optional<bool> quic_disable_disk_cache;
155 Optional<bool> quic_prefer_aes; 154 Optional<bool> quic_prefer_aes;
156 Optional<int> quic_max_number_of_lossy_connections; 155 Optional<int> quic_max_number_of_lossy_connections;
157 Optional<float> quic_packet_loss_threshold; 156 Optional<float> quic_packet_loss_threshold;
158 Optional<int> quic_socket_receive_buffer_size; 157 Optional<int> quic_socket_receive_buffer_size;
(...skipping 27 matching lines...) Expand all
186 185
187 // Clears the host cache. Intended to be used to prevent exposing recently 186 // Clears the host cache. Intended to be used to prevent exposing recently
188 // visited sites on about:net-internals/#dns and about:dns pages. Must be 187 // visited sites on about:net-internals/#dns and about:dns pages. Must be
189 // called on the IO thread. 188 // called on the IO thread.
190 void ClearHostCache(); 189 void ClearHostCache();
191 190
192 void InitializeNetworkSessionParams(net::HttpNetworkSession::Params* params); 191 void InitializeNetworkSessionParams(net::HttpNetworkSession::Params* params);
193 192
194 base::TimeTicks creation_time() const; 193 base::TimeTicks creation_time() const;
195 194
196 // Returns true if QUIC should be enabled for data reduction proxy as a result
197 // of a field trial.
198 static bool ShouldEnableQuicForDataReductionProxy();
199
200 private: 195 private:
201 // Map from name to value for all parameters associate with a field trial. 196 // Map from name to value for all parameters associate with a field trial.
202 typedef std::map<std::string, std::string> VariationParameters; 197 typedef std::map<std::string, std::string> VariationParameters;
203 198
204 // Provide SystemURLRequestContextGetter with access to 199 // Provide SystemURLRequestContextGetter with access to
205 // InitSystemRequestContext(). 200 // InitSystemRequestContext().
206 friend class SystemURLRequestContextGetter; 201 friend class SystemURLRequestContextGetter;
207 202
208 // WebThreadDelegate implementation, runs on the IO thread. 203 // WebThreadDelegate implementation, runs on the IO thread.
209 // This handles initialization and destruction of state that must 204 // This handles initialization and destruction of state that must
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // Configures QUIC options in |globals| based on the flags in |command_line| 259 // Configures QUIC options in |globals| based on the flags in |command_line|
265 // as well as the QUIC field trial group and parameters. 260 // as well as the QUIC field trial group and parameters.
266 // Must be called before ConfigureSpdyGlobals. 261 // Must be called before ConfigureSpdyGlobals.
267 static void ConfigureQuicGlobals(base::StringPiece quic_trial_group, 262 static void ConfigureQuicGlobals(base::StringPiece quic_trial_group,
268 const VariationParameters& quic_trial_params, 263 const VariationParameters& quic_trial_params,
269 Globals* globals); 264 Globals* globals);
270 265
271 // Returns true if QUIC should be enabled as a result of a field trial. 266 // Returns true if QUIC should be enabled as a result of a field trial.
272 static bool ShouldEnableQuic(base::StringPiece quic_trial_group); 267 static bool ShouldEnableQuic(base::StringPiece quic_trial_group);
273 268
274 // Returns true if QUIC should be enabled for proxies as a result of a
275 // field trial.
276 static bool ShouldEnableQuicForProxies(base::StringPiece quic_trial_group);
277
278 // Returns true if QUIC should always require handshake confirmation during 269 // Returns true if QUIC should always require handshake confirmation during
279 // the QUIC handshake. 270 // the QUIC handshake.
280 static bool ShouldQuicAlwaysRequireHandshakeConfirmation( 271 static bool ShouldQuicAlwaysRequireHandshakeConfirmation(
281 const VariationParameters& quic_trial_params); 272 const VariationParameters& quic_trial_params);
282 273
283 // Returns true if QUIC should disable connection pooling. 274 // Returns true if QUIC should disable connection pooling.
284 static bool ShouldQuicDisableConnectionPooling( 275 static bool ShouldQuicDisableConnectionPooling(
285 const VariationParameters& quic_trial_params); 276 const VariationParameters& quic_trial_params);
286 277
287 // Returns the ratio of time to load QUIC sever information from disk cache to 278 // Returns the ratio of time to load QUIC sever information from disk cache to
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 system_url_request_context_getter_; 379 system_url_request_context_getter_;
389 380
390 const base::TimeTicks creation_time_; 381 const base::TimeTicks creation_time_;
391 382
392 base::WeakPtrFactory<IOSChromeIOThread> weak_factory_; 383 base::WeakPtrFactory<IOSChromeIOThread> weak_factory_;
393 384
394 DISALLOW_COPY_AND_ASSIGN(IOSChromeIOThread); 385 DISALLOW_COPY_AND_ASSIGN(IOSChromeIOThread);
395 }; 386 };
396 387
397 #endif // IOS_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_ 388 #endif // IOS_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698