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

Unified Diff: chrome/browser/sync/test/integration/single_client_directory_sync_test.cc

Issue 1143343005: chrome/browser: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 6 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/test/integration/single_client_directory_sync_test.cc
diff --git a/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc b/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc
index b3cb1b90068821eeb71b5e278acc8ffd1f713665..2c00f09de84ecf7babc3d3d6d527d76dc3e191d1 100644
--- a/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/synchronization/waitable_event.h"
+#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/test/integration/bookmarks_helper.h"
@@ -37,7 +39,7 @@ void SignalEvent(base::WaitableEvent* e) {
bool WaitForExistingTasksOnLoop(base::MessageLoop* loop) {
base::WaitableEvent e(true, false);
- loop->PostTask(FROM_HERE, base::Bind(&SignalEvent, &e));
+ loop->task_runner()->PostTask(FROM_HERE, base::Bind(&SignalEvent, &e));
// Timeout stolen from StatusChangeChecker::GetTimeoutDuration().
return e.TimedWait(base::TimeDelta::FromSeconds(45));
}
@@ -68,7 +70,8 @@ IN_PROC_BROWSER_TEST_F(SingleClientDirectorySyncTest,
// Wait for StartupController::StartUp()'s tasks to finish.
base::RunLoop run_loop;
- base::MessageLoop::current()->PostTask(FROM_HERE, run_loop.QuitClosure());
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
+ run_loop.QuitClosure());
run_loop.Run();
// Wait for the directory deletion to finish.
base::MessageLoop* sync_loop = sync_service->GetSyncLoopForTest();

Powered by Google App Engine
This is Rietveld 408576698