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

Unified Diff: device/usb/usb_device_handle_android.cc

Issue 2849953003: Use the task scheduler for blocking tasks in the USB service on Linux (Closed)
Patch Set: Remove more passing of the SequencedTaskRunner Created 3 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
« no previous file with comments | « device/usb/usb_device_handle_android.h ('k') | device/usb/usb_device_handle_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_device_handle_android.cc
diff --git a/device/usb/usb_device_handle_android.cc b/device/usb/usb_device_handle_android.cc
index d5dce7a8e0f842d6e7029ac7a023fa108613183d..d3d794ab310329a4bf5c60be5a792cd4b430b55c 100644
--- a/device/usb/usb_device_handle_android.cc
+++ b/device/usb/usb_device_handle_android.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/location.h"
#include "device/usb/usb_device.h"
+#include "device/usb/usb_service.h"
#include "jni/ChromeUsbConnection_jni.h"
using base::android::ScopedJavaLocalRef;
@@ -17,23 +18,23 @@ namespace device {
scoped_refptr<UsbDeviceHandleAndroid> UsbDeviceHandleAndroid::Create(
JNIEnv* env,
scoped_refptr<UsbDevice> device,
- scoped_refptr<base::SequencedTaskRunner> blocking_task_runner,
const base::android::JavaRef<jobject>& usb_connection) {
ScopedJavaLocalRef<jobject> wrapper =
Java_ChromeUsbConnection_create(env, usb_connection);
// C++ doesn't own this file descriptor so CloseBlocking() is overridden
// below to release it without closing it.
base::ScopedFD fd(Java_ChromeUsbConnection_getFileDescriptor(env, wrapper));
- return make_scoped_refptr(new UsbDeviceHandleAndroid(
- device, std::move(fd), blocking_task_runner, wrapper));
+ return make_scoped_refptr(
+ new UsbDeviceHandleAndroid(device, std::move(fd), wrapper));
}
UsbDeviceHandleAndroid::UsbDeviceHandleAndroid(
scoped_refptr<UsbDevice> device,
base::ScopedFD fd,
- scoped_refptr<base::SequencedTaskRunner> blocking_task_runner,
const base::android::JavaRef<jobject>& wrapper)
- : UsbDeviceHandleUsbfs(device, std::move(fd), blocking_task_runner),
+ : UsbDeviceHandleUsbfs(device,
+ std::move(fd),
+ UsbService::CreateBlockingTaskRunner()),
j_object_(wrapper) {}
UsbDeviceHandleAndroid::~UsbDeviceHandleAndroid() {}
« no previous file with comments | « device/usb/usb_device_handle_android.h ('k') | device/usb/usb_device_handle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698