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

Unified Diff: chrome/browser/chromeos/net/network_portal_detector_impl_browsertest.cc

Issue 2033753002: Remove use of deprecated MessageLoop methods in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: manual change Created 4 years, 7 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/chromeos/net/network_portal_detector_impl_browsertest.cc
diff --git a/chrome/browser/chromeos/net/network_portal_detector_impl_browsertest.cc b/chrome/browser/chromeos/net/network_portal_detector_impl_browsertest.cc
index 8ec127b2467aa7455d3be3f6565a30e8f2c85c66..76da26a26019af3dd22de114535801916e5c17a6 100644
--- a/chrome/browser/chromeos/net/network_portal_detector_impl_browsertest.cc
+++ b/chrome/browser/chromeos/net/network_portal_detector_impl_browsertest.cc
@@ -4,9 +4,11 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
+#include "base/location.h"
#include "base/macros.h"
-#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/login/login_manager_test.h"
#include "chrome/browser/chromeos/login/startup_utils.h"
@@ -32,7 +34,6 @@
#include "ui/message_center/message_center.h"
#include "ui/message_center/message_center_observer.h"
-using base::MessageLoop;
using message_center::MessageCenter;
using message_center::MessageCenterObserver;
@@ -82,14 +83,18 @@ class TestObserver : public MessageCenterObserver {
void OnNotificationDisplayed(
const std::string& notification_id,
const message_center::DisplaySource source) override {
- if (notification_id == kNotificationId)
- MessageLoop::current()->PostTask(FROM_HERE, run_loop_->QuitClosure());
+ if (notification_id == kNotificationId) {
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
+ run_loop_->QuitClosure());
+ }
}
void OnNotificationRemoved(const std::string& notification_id,
bool by_user) override {
- if (notification_id == kNotificationId && by_user)
- MessageLoop::current()->PostTask(FROM_HERE, run_loop_->QuitClosure());
+ if (notification_id == kNotificationId && by_user) {
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
+ run_loop_->QuitClosure());
+ }
}
private:

Powered by Google App Engine
This is Rietveld 408576698