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

Unified Diff: chrome/browser/devtools/device/usb/android_usb_device.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 | « chrome/browser/devtools/device/usb/DEPS ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/devtools/device/usb/android_usb_device.cc
diff --git a/chrome/browser/devtools/device/usb/android_usb_device.cc b/chrome/browser/devtools/device/usb/android_usb_device.cc
index 3a2bee1d54720fc46e5a9714bc9c8d1f5101e54b..51aed478581e9fe3362c245f6ac8e392e52c5d81 100644
--- a/chrome/browser/devtools/device/usb/android_usb_device.cc
+++ b/chrome/browser/devtools/device/usb/android_usb_device.cc
@@ -21,6 +21,7 @@
#include "components/usb_service/usb_service.h"
#include "content/public/browser/browser_thread.h"
#include "crypto/rsa_private_key.h"
+#include "device/core/device_client.h"
#include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h"
#include "net/socket/stream_socket.h"
@@ -224,7 +225,7 @@ static void OpenAndroidDeviceOnFileThread(
static int CountOnFileThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- UsbService* service = UsbService::GetInstance();
+ UsbService* service = device::DeviceClient::Get()->GetUsbService();
UsbDevices usb_devices;
if (service != NULL)
service->GetDevices(&usb_devices);
@@ -249,7 +250,7 @@ static void EnumerateOnFileThread(
scoped_refptr<base::MessageLoopProxy> caller_message_loop_proxy) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- UsbService* service = UsbService::GetInstance();
+ UsbService* service = device::DeviceClient::Get()->GetUsbService();
UsbDevices usb_devices;
if (service != NULL)
service->GetDevices(&usb_devices);
« no previous file with comments | « chrome/browser/devtools/device/usb/DEPS ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698