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

Unified Diff: chrome/browser/sync_file_system/sync_file_system_test_util.cc

Issue 17127002: Correctly integrate StoragePartition into TestingProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix InstantNTP test. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync_file_system/sync_file_system_test_util.cc
diff --git a/chrome/browser/sync_file_system/sync_file_system_test_util.cc b/chrome/browser/sync_file_system/sync_file_system_test_util.cc
index 1f0c2144dc6bac46ec2f65e312ec247f2fc9b422..ccb56844a90f361e9a9c219748192e86655ed95e 100644
--- a/chrome/browser/sync_file_system/sync_file_system_test_util.cc
+++ b/chrome/browser/sync_file_system/sync_file_system_test_util.cc
@@ -9,12 +9,11 @@
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread.h"
-#include "content/public/test/test_browser_thread.h"
-#include "content/public/test/test_browser_thread_bundle.h"
+#include "content/public/browser/browser_thread.h"
+#include "content/public/test/test_utils.h"
#include "webkit/browser/fileapi/syncable/sync_status_code.h"
using content::BrowserThread;
-using content::TestBrowserThread;
namespace sync_file_system {
@@ -35,30 +34,4 @@ AssignAndQuitCallback(base::RunLoop* run_loop, R* result) {
template base::Callback<void(SyncStatusCode)>
AssignAndQuitCallback(base::RunLoop*, SyncStatusCode*);
-MultiThreadTestHelper::MultiThreadTestHelper()
- : thread_bundle_(new content::TestBrowserThreadBundle(
- content::TestBrowserThreadBundle::REAL_FILE_THREAD |
- content::TestBrowserThreadBundle::REAL_IO_THREAD)) {
-}
-
-MultiThreadTestHelper::~MultiThreadTestHelper() {}
-
-void MultiThreadTestHelper::SetUp() {
- ui_task_runner_ =
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI);
- file_task_runner_ =
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE);
- io_task_runner_ =
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
-}
-
-void MultiThreadTestHelper::TearDown() {
- // Make sure we give some more time to finish tasks on the FILE thread
- // before stopping IO/FILE threads.
- base::RunLoop run_loop;
- file_task_runner_->PostTaskAndReply(
- FROM_HERE, base::Bind(&base::DoNothing), run_loop.QuitClosure());
- run_loop.Run();
-}
-
} // namespace sync_file_system

Powered by Google App Engine
This is Rietveld 408576698