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

Unified Diff: extensions/shell/browser/shell_device_client.cc

Issue 980023002: Move device/usb classes from the FILE thread to UI thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed first round of rocket@ feedback. Created 5 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
Index: extensions/shell/browser/shell_device_client.cc
diff --git a/extensions/shell/browser/shell_device_client.cc b/extensions/shell/browser/shell_device_client.cc
index 90e974b1f26faee8bdb1752ad23d17514852c494..5dd1c6b689755b85d1c2874c38034b2554f87eb0 100644
--- a/extensions/shell/browser/shell_device_client.cc
+++ b/extensions/shell/browser/shell_device_client.cc
@@ -9,6 +9,8 @@
#include "device/hid/hid_service.h"
#include "device/usb/usb_service.h"
+using content::BrowserThread;
+
namespace extensions {
ShellDeviceClient::ShellDeviceClient() {}
@@ -16,15 +18,15 @@ ShellDeviceClient::ShellDeviceClient() {}
ShellDeviceClient::~ShellDeviceClient() {}
device::UsbService* ShellDeviceClient::GetUsbService() {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return device::UsbService::GetInstance(
- content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::UI));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
}
device::HidService* ShellDeviceClient::GetHidService() {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return device::HidService::GetInstance(
- content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::FILE));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
}
}

Powered by Google App Engine
This is Rietveld 408576698