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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 return NULL; | 309 return NULL; |
310 #endif | 310 #endif |
311 } | 311 } |
312 // Configures QUIC options in |globals| based on the flags in |command_line| | 312 // Configures QUIC options in |globals| based on the flags in |command_line| |
313 // as well as the QUIC field trial group and parameters. Must be called | 313 // as well as the QUIC field trial group and parameters. Must be called |
314 // before ConfigureSpdyGlobals. | 314 // before ConfigureSpdyGlobals. |
315 static void ConfigureQuicGlobals( | 315 static void ConfigureQuicGlobals( |
316 const base::CommandLine& command_line, | 316 const base::CommandLine& command_line, |
317 base::StringPiece quic_trial_group, | 317 base::StringPiece quic_trial_group, |
318 const VariationParameters& quic_trial_params, | 318 const VariationParameters& quic_trial_params, |
| 319 bool quic_allowed_by_policy, |
319 Globals* globals); | 320 Globals* globals); |
320 | 321 |
321 // Returns true if QUIC should be enabled, either as a result | 322 // Returns true if QUIC should be enabled, either as a result |
322 // of a field trial or a command line flag. | 323 // of a field trial or a command line flag. |
323 static bool ShouldEnableQuic( | 324 static bool ShouldEnableQuic( |
324 const base::CommandLine& command_line, | 325 const base::CommandLine& command_line, |
325 base::StringPiece quic_trial_group); | 326 base::StringPiece quic_trial_group, |
| 327 bool quic_allowed_by_policy); |
326 | 328 |
327 // Returns true if QUIC should be enabled for proxies, either as a result | 329 // Returns true if QUIC should be enabled for proxies, either as a result |
328 // of a field trial or a command line flag. | 330 // of a field trial or a command line flag. |
329 static bool ShouldEnableQuicForProxies( | 331 static bool ShouldEnableQuicForProxies( |
330 const base::CommandLine& command_line, | 332 const base::CommandLine& command_line, |
331 base::StringPiece quic_trial_group); | 333 base::StringPiece quic_trial_group, |
| 334 bool quic_allowed_by_policy); |
332 | 335 |
333 // Returns true if the selection of the ephemeral port in bind() should be | 336 // Returns true if the selection of the ephemeral port in bind() should be |
334 // performed by Chromium, and false if the OS should select the port. The OS | 337 // performed by Chromium, and false if the OS should select the port. The OS |
335 // option is used to prevent Windows from posting a security security warning | 338 // option is used to prevent Windows from posting a security security warning |
336 // dialog. | 339 // dialog. |
337 static bool ShouldEnableQuicPortSelection( | 340 static bool ShouldEnableQuicPortSelection( |
338 const base::CommandLine& command_line); | 341 const base::CommandLine& command_line); |
339 | 342 |
340 // Returns true if QUIC packet pacing should be negotiated during the | 343 // Returns true if QUIC packet pacing should be negotiated during the |
341 // QUIC handshake. | 344 // QUIC handshake. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 scoped_ptr<net::ProxyConfigService> system_proxy_config_service_; | 467 scoped_ptr<net::ProxyConfigService> system_proxy_config_service_; |
465 | 468 |
466 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 469 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
467 | 470 |
468 scoped_refptr<net::URLRequestContextGetter> | 471 scoped_refptr<net::URLRequestContextGetter> |
469 system_url_request_context_getter_; | 472 system_url_request_context_getter_; |
470 | 473 |
471 // True if SPDY is disabled by policy. | 474 // True if SPDY is disabled by policy. |
472 bool is_spdy_disabled_by_policy_; | 475 bool is_spdy_disabled_by_policy_; |
473 | 476 |
| 477 // True if QUIC is allowed by policy. |
| 478 bool is_quic_allowed_by_policy_; |
| 479 |
474 const base::TimeTicks creation_time_; | 480 const base::TimeTicks creation_time_; |
475 | 481 |
476 base::WeakPtrFactory<IOThread> weak_factory_; | 482 base::WeakPtrFactory<IOThread> weak_factory_; |
477 | 483 |
478 DISALLOW_COPY_AND_ASSIGN(IOThread); | 484 DISALLOW_COPY_AND_ASSIGN(IOThread); |
479 }; | 485 }; |
480 | 486 |
481 #endif // CHROME_BROWSER_IO_THREAD_H_ | 487 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |