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

Unified Diff: device/test/usb_test_gadget_impl.cc

Issue 2031743005: Remove use of deprecated MessageLoop methods in device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « device/serial/serial_io_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/test/usb_test_gadget_impl.cc
diff --git a/device/test/usb_test_gadget_impl.cc b/device/test/usb_test_gadget_impl.cc
index 98d1dc5cf5d3c873453168a694555fb98eea4bde..5f6ecf64b3d9d18cb67a71c42ff008177f6a54da 100644
--- a/device/test/usb_test_gadget_impl.cc
+++ b/device/test/usb_test_gadget_impl.cc
@@ -13,6 +13,7 @@
#include "base/compiler_specific.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
+#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
@@ -21,6 +22,7 @@
#include "base/process/process_handle.h"
#include "base/run_loop.h"
#include "base/scoped_observer.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -237,7 +239,7 @@ class UsbGadgetFactory : public UsbService::Observer,
if (!device_) {
// TODO(reillyg): This timer could be replaced by a way to use long-
// polling to wait for claimed devices to become unclaimed.
- base::MessageLoop::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::Bind(&UsbGadgetFactory::EnumerateDevices,
weak_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kReenumeratePeriod));
@@ -377,7 +379,7 @@ class UsbGadgetFactory : public UsbService::Observer,
version_.clear();
// Wait a bit and then try again to find an available device.
- base::MessageLoop::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::Bind(&UsbGadgetFactory::EnumerateDevices,
weak_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kReenumeratePeriod));
« no previous file with comments | « device/serial/serial_io_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698