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

Side by Side Diff: chrome/browser/io_thread.h

Issue 1124583007: Added QuicAllowed policy. Added unit and browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2357
Patch Set: Created 5 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
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('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 (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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 return NULL; 312 return NULL;
313 #endif 313 #endif
314 } 314 }
315 // Configures QUIC options in |globals| based on the flags in |command_line| 315 // Configures QUIC options in |globals| based on the flags in |command_line|
316 // as well as the QUIC field trial group and parameters. Must be called 316 // as well as the QUIC field trial group and parameters. Must be called
317 // before ConfigureSpdyGlobals. 317 // before ConfigureSpdyGlobals.
318 static void ConfigureQuicGlobals( 318 static void ConfigureQuicGlobals(
319 const base::CommandLine& command_line, 319 const base::CommandLine& command_line,
320 base::StringPiece quic_trial_group, 320 base::StringPiece quic_trial_group,
321 const VariationParameters& quic_trial_params, 321 const VariationParameters& quic_trial_params,
322 bool quic_allowed_by_policy,
322 Globals* globals); 323 Globals* globals);
323 324
324 // Returns true if QUIC should be enabled, either as a result 325 // Returns true if QUIC should be enabled, either as a result
325 // of a field trial or a command line flag. 326 // of a field trial or a command line flag.
326 static bool ShouldEnableQuic( 327 static bool ShouldEnableQuic(
327 const base::CommandLine& command_line, 328 const base::CommandLine& command_line,
328 base::StringPiece quic_trial_group); 329 base::StringPiece quic_trial_group,
330 bool quic_allowed_by_policy);
329 331
330 // Returns true if QUIC should be enabled for proxies, either as a result 332 // Returns true if QUIC should be enabled for proxies, either as a result
331 // of a field trial or a command line flag. 333 // of a field trial or a command line flag.
332 static bool ShouldEnableQuicForProxies( 334 static bool ShouldEnableQuicForProxies(
333 const base::CommandLine& command_line, 335 const base::CommandLine& command_line,
334 base::StringPiece quic_trial_group); 336 base::StringPiece quic_trial_group,
337 bool quic_allowed_by_policy);
335 338
336 // Returns true if the selection of the ephemeral port in bind() should be 339 // Returns true if the selection of the ephemeral port in bind() should be
337 // performed by Chromium, and false if the OS should select the port. The OS 340 // performed by Chromium, and false if the OS should select the port. The OS
338 // option is used to prevent Windows from posting a security security warning 341 // option is used to prevent Windows from posting a security security warning
339 // dialog. 342 // dialog.
340 static bool ShouldEnableQuicPortSelection( 343 static bool ShouldEnableQuicPortSelection(
341 const base::CommandLine& command_line); 344 const base::CommandLine& command_line);
342 345
343 // Returns true if QUIC packet pacing should be negotiated during the 346 // Returns true if QUIC packet pacing should be negotiated during the
344 // QUIC handshake. 347 // QUIC handshake.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 scoped_ptr<net::ProxyConfigService> system_proxy_config_service_; 470 scoped_ptr<net::ProxyConfigService> system_proxy_config_service_;
468 471
469 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; 472 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
470 473
471 scoped_refptr<net::URLRequestContextGetter> 474 scoped_refptr<net::URLRequestContextGetter>
472 system_url_request_context_getter_; 475 system_url_request_context_getter_;
473 476
474 // True if SPDY is disabled by policy. 477 // True if SPDY is disabled by policy.
475 bool is_spdy_disabled_by_policy_; 478 bool is_spdy_disabled_by_policy_;
476 479
480 // True if QUIC is allowed by policy.
481 bool is_quic_allowed_by_policy_;
482
477 const base::TimeTicks creation_time_; 483 const base::TimeTicks creation_time_;
478 484
479 base::WeakPtrFactory<IOThread> weak_factory_; 485 base::WeakPtrFactory<IOThread> weak_factory_;
480 486
481 DISALLOW_COPY_AND_ASSIGN(IOThread); 487 DISALLOW_COPY_AND_ASSIGN(IOThread);
482 }; 488 };
483 489
484 #endif // CHROME_BROWSER_IO_THREAD_H_ 490 #endif // CHROME_BROWSER_IO_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698