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

Unified Diff: content/public/test/test_browser_thread.cc

Issue 2464233002: Experiment with redirecting all BrowserThreads (but UI/IO) to TaskScheduler (Closed)
Patch Set: Add ResetGlobalsForTesting() and fix shutdown state in unittests Created 4 years, 1 month 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
Index: content/public/test/test_browser_thread.cc
diff --git a/content/public/test/test_browser_thread.cc b/content/public/test/test_browser_thread.cc
index ae83f78f78aad1455f8a9f98aa6c4f003ef4499b..6bf479a0fcd39bf691a6f4cc36c89308343fdfd9 100644
--- a/content/public/test/test_browser_thread.cc
+++ b/content/public/test/test_browser_thread.cc
@@ -40,15 +40,17 @@ class TestBrowserThreadImpl : public BrowserThreadImpl {
};
TestBrowserThread::TestBrowserThread(BrowserThread::ID identifier)
- : impl_(new TestBrowserThreadImpl(identifier)) {
-}
+ : impl_(new TestBrowserThreadImpl(identifier)), identifier_(identifier) {}
TestBrowserThread::TestBrowserThread(BrowserThread::ID identifier,
base::MessageLoop* message_loop)
- : impl_(new TestBrowserThreadImpl(identifier, message_loop)) {}
+ : impl_(new TestBrowserThreadImpl(identifier, message_loop)),
+ identifier_(identifier) {}
TestBrowserThread::~TestBrowserThread() {
Stop();
+ impl_.reset();
+ BrowserThreadImpl::ResetGlobalsForTesting(identifier_);
}
bool TestBrowserThread::Start() {
« content/browser/browser_main_loop.cc ('K') | « content/public/test/test_browser_thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698