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

Unified Diff: chrome/browser/sync/test/integration/sessions_helper.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/sessions_helper.cc
diff --git a/chrome/browser/sync/test/integration/sessions_helper.cc b/chrome/browser/sync/test/integration/sessions_helper.cc
index e757f93b940bed7dcf08657cf5b4b5626f1452cd..8a4219c12378f05e6ca268823b5029cd305cc33a 100644
--- a/chrome/browser/sync/test/integration/sessions_helper.cc
+++ b/chrome/browser/sync/test/integration/sessions_helper.cc
@@ -8,9 +8,12 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/location.h"
#include "base/memory/weak_ptr.h"
+#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/test/test_timeouts.h"
+#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/open_tabs_ui_delegate.h"
@@ -130,7 +133,7 @@ namespace {
class TabEventHandler : public browser_sync::LocalSessionEventHandler {
public:
TabEventHandler() : weak_factory_(this) {
- base::MessageLoop::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
base::Bind(&TabEventHandler::QuitLoop, weak_factory_.GetWeakPtr()),
TestTimeouts::action_max_timeout());
@@ -139,7 +142,7 @@ class TabEventHandler : public browser_sync::LocalSessionEventHandler {
void OnLocalTabModified(
browser_sync::SyncedTabDelegate* modified_tab) override {
// Unwind to ensure SessionsSyncManager has processed the event.
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&TabEventHandler::QuitLoop, weak_factory_.GetWeakPtr()));
}
@@ -147,7 +150,7 @@ class TabEventHandler : public browser_sync::LocalSessionEventHandler {
void OnFaviconPageUrlsUpdated(
const std::set<GURL>& updated_page_urls) override {
// Unwind to ensure SessionsSyncManager has processed the event.
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&TabEventHandler::QuitLoop, weak_factory_.GetWeakPtr()));
}

Powered by Google App Engine
This is Rietveld 408576698