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

Unified Diff: chrome/browser/devtools/device/usb/android_usb_device.h

Issue 980023002: Move device/usb classes from the FILE thread to UI thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Allow USB transfer calls from any thread again. Created 5 years, 8 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/devtools/device/usb/android_usb_device.h
diff --git a/chrome/browser/devtools/device/usb/android_usb_device.h b/chrome/browser/devtools/device/usb/android_usb_device.h
index 3400a977dcaabdc5b5edca1d311582c63b5bd55a..af976a0c0b12247181d1c70c9fc32e5c414f4f98 100644
--- a/chrome/browser/devtools/device/usb/android_usb_device.h
+++ b/chrome/browser/devtools/device/usb/android_usb_device.h
@@ -15,7 +15,7 @@
#include "device/usb/usb_device_handle.h"
namespace base {
-class MessageLoop;
+class SingleThreadTaskRunner;
}
namespace crypto {
@@ -68,11 +68,10 @@ typedef base::Callback<void(const AndroidUsbDevices&)>
class AndroidUsbDevice : public base::RefCountedThreadSafe<AndroidUsbDevice> {
public:
+ static void CountDevices(const base::Callback<void(int)>& callback);
static void Enumerate(crypto::RSAPrivateKey* rsa_key,
const AndroidUsbDevicesCallback& callback);
- static void CountDevices(const base::Callback<void(int)>& callback);
-
AndroidUsbDevice(crypto::RSAPrivateKey* rsa_key,
scoped_refptr<device::UsbDeviceHandle> device,
const std::string& serial,
@@ -130,7 +129,7 @@ class AndroidUsbDevice : public base::RefCountedThreadSafe<AndroidUsbDevice> {
void SocketDeleted(uint32 socket_id);
- base::MessageLoop* message_loop_;
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
scoped_ptr<crypto::RSAPrivateKey> rsa_key_;

Powered by Google App Engine
This is Rietveld 408576698