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

Unified Diff: chrome/browser/google_url_tracker_unittest.cc

Issue 3176028: Use ChromeThread::IO instead of virtual set_request_context (Closed)
Patch Set: Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/net/test_url_fetcher_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_url_tracker_unittest.cc
diff --git a/chrome/browser/google_url_tracker_unittest.cc b/chrome/browser/google_url_tracker_unittest.cc
index 428a3e335f6b76e28083e3a3a4852236adc5b92c..f0a6d2a2b1a4fc4d135141c610cd02b7cbd9e574 100644
--- a/chrome/browser/google_url_tracker_unittest.cc
+++ b/chrome/browser/google_url_tracker_unittest.cc
@@ -70,13 +70,16 @@ class TestInfoBarDelegateFactory
class GoogleURLTrackerTest : public testing::Test {
protected:
GoogleURLTrackerTest()
- : original_default_request_context_(NULL) {
+ : message_loop_(NULL),
+ io_thread_(NULL),
+ original_default_request_context_(NULL) {
}
void SetUp() {
original_default_request_context_ = Profile::GetDefaultRequestContext();
Profile::set_default_request_context(NULL);
message_loop_ = new MessageLoop(MessageLoop::TYPE_IO);
+ io_thread_ = new ChromeThread(ChromeThread::IO, message_loop_);
network_change_notifier_.reset(net::NetworkChangeNotifier::CreateMock());
testing_profile_.reset(new TestingProfile);
TestingBrowserProcess* testing_browser_process =
@@ -99,8 +102,10 @@ class GoogleURLTrackerTest : public testing::Test {
testing_browser_process->SetPrefService(NULL);
testing_profile_.reset();
network_change_notifier_.reset();
+ delete io_thread_;
delete message_loop_;
Profile::set_default_request_context(original_default_request_context_);
+ original_default_request_context_ = NULL;
}
void CreateRequestContext() {
@@ -215,6 +220,7 @@ class GoogleURLTrackerTest : public testing::Test {
private:
MessageLoop* message_loop_;
+ ChromeThread* io_thread_;
Paweł Hajdan Jr. 2010/08/23 17:22:48 Why isn't it a scoped_ptr? I suggest we just make
scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_;
scoped_ptr<TestingProfile> testing_profile_;
« no previous file with comments | « no previous file | chrome/common/net/test_url_fetcher_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698