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

Unified Diff: chrome/browser/local_discovery/local_domain_resolver_unittest.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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/local_discovery/local_domain_resolver_unittest.cc
diff --git a/chrome/browser/local_discovery/local_domain_resolver_unittest.cc b/chrome/browser/local_discovery/local_domain_resolver_unittest.cc
index b66f2b4ddc3ba01addaee57f197e3b399179414d..241c3a14c580e6c24f5e19b8629cbcbd6e6fb87b 100644
--- a/chrome/browser/local_discovery/local_domain_resolver_unittest.cc
+++ b/chrome/browser/local_discovery/local_domain_resolver_unittest.cc
@@ -5,6 +5,7 @@
#include <stdint.h>
#include "base/location.h"
+#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/local_discovery/service_discovery_client_impl.h"
@@ -84,13 +85,11 @@ class LocalDomainResolverTest : public testing::Test {
}
void RunFor(base::TimeDelta time_period) {
- base::CancelableCallback<void()> callback(
- base::Bind(&base::MessageLoop::QuitWhenIdle,
- base::Unretained(base::MessageLoop::current())));
+ base::RunLoop run_loop;
+ base::CancelableCallback<void()> callback(run_loop.QuitWhenIdleClosure());
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, callback.callback(), time_period);
-
- base::MessageLoop::current()->Run();
+ run_loop.Run();
callback.Cancel();
}

Powered by Google App Engine
This is Rietveld 408576698