OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_IO_THREAD_H_ | 5 #ifndef CHROME_BROWSER_IO_THREAD_H_ |
6 #define CHROME_BROWSER_IO_THREAD_H_ | 6 #define CHROME_BROWSER_IO_THREAD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
323 #else | 323 #else |
324 return NULL; | 324 return NULL; |
325 #endif | 325 #endif |
326 } | 326 } |
327 // Configures QUIC options in |globals| based on the flags in |command_line| | 327 // Configures QUIC options in |globals| based on the flags in |command_line| |
328 // as well as the QUIC field trial group and parameters. | 328 // as well as the QUIC field trial group and parameters. |
329 static void ConfigureQuicGlobals( | 329 static void ConfigureQuicGlobals( |
330 const base::CommandLine& command_line, | 330 const base::CommandLine& command_line, |
331 base::StringPiece quic_trial_group, | 331 base::StringPiece quic_trial_group, |
332 const VariationParameters& quic_trial_params, | 332 const VariationParameters& quic_trial_params, |
333 bool quic_allowed_by_policy, | |
333 Globals* globals); | 334 Globals* globals); |
334 | 335 |
Ryan Hamilton
2015/03/18 18:42:54
Can you add tests for this new logic in io_thread_
peletskyi
2015/03/20 17:54:47
Done.
| |
335 // Returns true if QUIC should be enabled, either as a result | 336 // Returns true if QUIC should be enabled, either as a result |
336 // of a field trial or a command line flag. | 337 // of a field trial or a command line flag. |
337 static bool ShouldEnableQuic( | 338 static bool ShouldEnableQuic( |
338 const base::CommandLine& command_line, | 339 const base::CommandLine& command_line, |
339 base::StringPiece quic_trial_group); | 340 base::StringPiece quic_trial_group, |
341 bool quic_allowed_by_policy); | |
340 | 342 |
341 // Returns true if QUIC should be enabled for proxies, either as a result | 343 // Returns true if QUIC should be enabled for proxies, either as a result |
342 // of a field trial or a command line flag. | 344 // of a field trial or a command line flag. |
343 static bool ShouldEnableQuicForProxies( | 345 static bool ShouldEnableQuicForProxies( |
344 const base::CommandLine& command_line, | 346 const base::CommandLine& command_line, |
345 base::StringPiece quic_trial_group); | 347 base::StringPiece quic_trial_group, |
348 bool quic_allowed_by_policy); | |
346 | 349 |
347 // Returns true if the selection of the ephemeral port in bind() should be | 350 // Returns true if the selection of the ephemeral port in bind() should be |
348 // performed by Chromium, and false if the OS should select the port. The OS | 351 // performed by Chromium, and false if the OS should select the port. The OS |
349 // option is used to prevent Windows from posting a security security warning | 352 // option is used to prevent Windows from posting a security security warning |
350 // dialog. | 353 // dialog. |
351 static bool ShouldEnableQuicPortSelection( | 354 static bool ShouldEnableQuicPortSelection( |
352 const base::CommandLine& command_line); | 355 const base::CommandLine& command_line); |
353 | 356 |
354 // Returns true if QUIC packet pacing should be negotiated during the | 357 // Returns true if QUIC packet pacing should be negotiated during the |
355 // QUIC handshake. | 358 // QUIC handshake. |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
466 scoped_ptr<net::ProxyConfigService> system_proxy_config_service_; | 469 scoped_ptr<net::ProxyConfigService> system_proxy_config_service_; |
467 | 470 |
468 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 471 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
469 | 472 |
470 scoped_refptr<net::URLRequestContextGetter> | 473 scoped_refptr<net::URLRequestContextGetter> |
471 system_url_request_context_getter_; | 474 system_url_request_context_getter_; |
472 | 475 |
473 // True if SPDY is disabled by policy. | 476 // True if SPDY is disabled by policy. |
474 bool is_spdy_disabled_by_policy_; | 477 bool is_spdy_disabled_by_policy_; |
475 | 478 |
479 // True if QUIC is allowed by policy. | |
480 bool is_quic_allowed_by_policy_; | |
Ryan Hamilton
2015/03/18 18:42:54
heh, it's unfortunate that the polarity of this po
peletskyi
2015/03/20 17:54:47
Unfortunately one is not allowed not give name "Qu
| |
481 | |
476 const base::TimeTicks creation_time_; | 482 const base::TimeTicks creation_time_; |
477 | 483 |
478 base::WeakPtrFactory<IOThread> weak_factory_; | 484 base::WeakPtrFactory<IOThread> weak_factory_; |
479 | 485 |
480 DISALLOW_COPY_AND_ASSIGN(IOThread); | 486 DISALLOW_COPY_AND_ASSIGN(IOThread); |
481 }; | 487 }; |
482 | 488 |
483 #endif // CHROME_BROWSER_IO_THREAD_H_ | 489 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |