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

Unified Diff: components/usb_service/usb_service.h

Issue 507503002: Remove BrowserThread dependency from usb_service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move device/common to device/core. Created 6 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
« no previous file with comments | « components/usb_service/usb_device_impl.cc ('k') | components/usb_service/usb_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/usb_service/usb_service.h
diff --git a/components/usb_service/usb_service.h b/components/usb_service/usb_service.h
index 133cacd7e57374c23a331bcc53ff29b4344b34a1..11eac1aafbd3d6e69721fb50e65722eced90ada3 100644
--- a/components/usb_service/usb_service.h
+++ b/components/usb_service/usb_service.h
@@ -12,6 +12,10 @@
#include "base/threading/non_thread_safe.h"
#include "components/usb_service/usb_service_export.h"
+namespace base {
+class SingleThreadTaskRunner;
+}
+
namespace usb_service {
class UsbDevice;
@@ -22,9 +26,12 @@ class UsbDevice;
// competition for the same USB device.
class USB_SERVICE_EXPORT UsbService : public base::NonThreadSafe {
public:
- // Must be called on FILE thread.
- // Returns NULL when failed to initialized.
- static UsbService* GetInstance();
+ // Must be called on a thread with a MessageLoopForIO (for example
+ // BrowserThread::FILE). The UI task runner reference is used to talk to the
+ // PermissionBrokerClient on ChromeOS (UI thread). Returns NULL when
+ // initialization fails.
+ static UsbService* GetInstance(
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
static void SetInstanceForTest(UsbService* instance);
« no previous file with comments | « components/usb_service/usb_device_impl.cc ('k') | components/usb_service/usb_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698