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

Unified Diff: extensions/browser/api/usb_private/usb_private_api.cc

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 | « extensions/browser/api/usb_private/DEPS ('k') | extensions/shell/app_shell.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/usb_private/usb_private_api.cc
diff --git a/extensions/browser/api/usb_private/usb_private_api.cc b/extensions/browser/api/usb_private/usb_private_api.cc
index 860a13a513f5f47e480bed9ce01587a88ac5c7e1..22c11ba6a78224c3afcfc3466d9b69bcd675440a 100644
--- a/extensions/browser/api/usb_private/usb_private_api.cc
+++ b/extensions/browser/api/usb_private/usb_private_api.cc
@@ -12,6 +12,7 @@
#include "components/usb_service/usb_device_filter.h"
#include "components/usb_service/usb_device_handle.h"
#include "components/usb_service/usb_service.h"
+#include "device/core/device_client.h"
#include "device/usb/usb_ids.h"
#include "extensions/common/api/usb_private.h"
@@ -19,6 +20,7 @@ namespace usb_private = extensions::core_api::usb_private;
namespace GetDevices = usb_private::GetDevices;
namespace GetDeviceInfo = usb_private::GetDeviceInfo;
+using content::BrowserThread;
using usb_service::UsbDevice;
using usb_service::UsbDeviceFilter;
using usb_service::UsbDeviceHandle;
@@ -47,7 +49,7 @@ bool UsbPrivateGetDevicesFunction::Prepare() {
}
void UsbPrivateGetDevicesFunction::AsyncWorkStart() {
- UsbService* service = UsbService::GetInstance();
+ UsbService* service = device::DeviceClient::Get()->GetUsbService();
if (!service) {
CompleteWithError(kErrorInitService);
return;
@@ -117,7 +119,7 @@ bool UsbPrivateGetDeviceInfoFunction::Prepare() {
}
void UsbPrivateGetDeviceInfoFunction::AsyncWorkStart() {
- UsbService* service = UsbService::GetInstance();
+ UsbService* service = device::DeviceClient::Get()->GetUsbService();
if (!service) {
CompleteWithError(kErrorInitService);
return;
« no previous file with comments | « extensions/browser/api/usb_private/DEPS ('k') | extensions/shell/app_shell.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698