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

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: Do the same to chrome/browser/BUILD.gn. 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
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..c4a8b13d900d263749ce544730b3abb1d160b04a 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 MessageLoopIO (normally
Ken Rockot(use gerrit already) 2014/08/28 21:47:03 MessageLoopForIO? I also might omit any mention of
Reilly Grant (use Gerrit) 2014/08/28 22:16:13 I'm using it as an 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);

Powered by Google App Engine
This is Rietveld 408576698