| 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 #include "chrome/browser/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 | 436 |
| 437 pref_proxy_config_tracker_->DetachFromPrefService(); | 437 pref_proxy_config_tracker_->DetachFromPrefService(); |
| 438 DCHECK(!globals_); | 438 DCHECK(!globals_); |
| 439 } | 439 } |
| 440 | 440 |
| 441 IOThread::Globals* IOThread::globals() { | 441 IOThread::Globals* IOThread::globals() { |
| 442 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 442 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 443 return globals_; | 443 return globals_; |
| 444 } | 444 } |
| 445 | 445 |
| 446 void IOThread::SetGlobalsForTesting(Globals* globals) { |
| 447 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 448 DCHECK(!globals || !globals_); |
| 449 globals_ = globals; |
| 450 } |
| 451 |
| 446 ChromeNetLog* IOThread::net_log() { | 452 ChromeNetLog* IOThread::net_log() { |
| 447 return net_log_; | 453 return net_log_; |
| 448 } | 454 } |
| 449 | 455 |
| 450 void IOThread::ChangedToOnTheRecord() { | 456 void IOThread::ChangedToOnTheRecord() { |
| 451 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 457 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 452 BrowserThread::PostTask( | 458 BrowserThread::PostTask( |
| 453 BrowserThread::IO, | 459 BrowserThread::IO, |
| 454 FROM_HERE, | 460 FROM_HERE, |
| 455 base::Bind(&IOThread::ChangedToOnTheRecordOnIOThread, | 461 base::Bind(&IOThread::ChangedToOnTheRecordOnIOThread, |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 if (command_line.HasSwitch(switches::kDisableQuic)) | 976 if (command_line.HasSwitch(switches::kDisableQuic)) |
| 971 return false; | 977 return false; |
| 972 | 978 |
| 973 if (command_line.HasSwitch(switches::kEnableQuic) || | 979 if (command_line.HasSwitch(switches::kEnableQuic) || |
| 974 command_line.HasSwitch(switches::kEnableQuicHttps)) { | 980 command_line.HasSwitch(switches::kEnableQuicHttps)) { |
| 975 return true; | 981 return true; |
| 976 } | 982 } |
| 977 | 983 |
| 978 return quic_trial_group == kQuicFieldTrialEnabledGroupName; | 984 return quic_trial_group == kQuicFieldTrialEnabledGroupName; |
| 979 } | 985 } |
| OLD | NEW |