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

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

Issue 17127002: Correctly integrate StoragePartition into TestingProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments. merge to ToT. Murder a DB thread and more TestBrowserThreads. Created 7 years, 5 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 | Annotate | Revision Log
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 #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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 435
436 pref_proxy_config_tracker_->DetachFromPrefService(); 436 pref_proxy_config_tracker_->DetachFromPrefService();
437 DCHECK(!globals_); 437 DCHECK(!globals_);
438 } 438 }
439 439
440 IOThread::Globals* IOThread::globals() { 440 IOThread::Globals* IOThread::globals() {
441 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 441 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
442 return globals_; 442 return globals_;
443 } 443 }
444 444
445 void IOThread::SetGlobalsForTesting(Globals* globals) {
446 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
447 DCHECK(!globals || !globals_);
448 globals_ = globals;
449 }
450
445 ChromeNetLog* IOThread::net_log() { 451 ChromeNetLog* IOThread::net_log() {
446 return net_log_; 452 return net_log_;
447 } 453 }
448 454
449 void IOThread::ChangedToOnTheRecord() { 455 void IOThread::ChangedToOnTheRecord() {
450 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 456 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
451 BrowserThread::PostTask( 457 BrowserThread::PostTask(
452 BrowserThread::IO, 458 BrowserThread::IO,
453 FROM_HERE, 459 FROM_HERE,
454 base::Bind(&IOThread::ChangedToOnTheRecordOnIOThread, 460 base::Bind(&IOThread::ChangedToOnTheRecordOnIOThread,
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 base::FieldTrialList::FindFullName(kQuicFieldTrialName); 966 base::FieldTrialList::FindFullName(kQuicFieldTrialName);
961 967
962 if (command_line.HasSwitch(switches::kDisableQuic)) 968 if (command_line.HasSwitch(switches::kDisableQuic))
963 return false; 969 return false;
964 970
965 if (command_line.HasSwitch(switches::kEnableQuic)) 971 if (command_line.HasSwitch(switches::kEnableQuic))
966 return true; 972 return true;
967 973
968 return quic_trial_group == kQuicFieldTrialEnabledGroupName; 974 return quic_trial_group == kQuicFieldTrialEnabledGroupName;
969 } 975 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698