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

Side by Side Diff: chrome/browser/chrome_device_client.cc

Issue 2885143002: Use the task scheduler in the new Windows USB backend (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_device_client.h" 5 #include "chrome/browser/chrome_device_client.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "device/hid/hid_service.h" 9 #include "device/hid/hid_service.h"
10 #include "device/usb/usb_service.h" 10 #include "device/usb/usb_service.h"
(...skipping 13 matching lines...) Expand all
24 usb_service_->Shutdown(); 24 usb_service_->Shutdown();
25 if (hid_service_) 25 if (hid_service_)
26 hid_service_->Shutdown(); 26 hid_service_->Shutdown();
27 #if DCHECK_IS_ON() 27 #if DCHECK_IS_ON()
28 did_shutdown_ = true; 28 did_shutdown_ = true;
29 #endif 29 #endif
30 } 30 }
31 31
32 device::UsbService* ChromeDeviceClient::GetUsbService() { 32 device::UsbService* ChromeDeviceClient::GetUsbService() {
33 DCHECK_CURRENTLY_ON(BrowserThread::UI); 33 DCHECK_CURRENTLY_ON(BrowserThread::UI);
34 if (!usb_service_) { 34 if (!usb_service_)
35 usb_service_ = device::UsbService::Create( 35 usb_service_ = device::UsbService::Create();
36 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE));
37 }
38 return usb_service_.get(); 36 return usb_service_.get();
39 } 37 }
40 38
41 device::HidService* ChromeDeviceClient::GetHidService() { 39 device::HidService* ChromeDeviceClient::GetHidService() {
42 DCHECK_CURRENTLY_ON(BrowserThread::UI); 40 DCHECK_CURRENTLY_ON(BrowserThread::UI);
43 #if !defined(OS_ANDROID) 41 #if !defined(OS_ANDROID)
44 if (!hid_service_) 42 if (!hid_service_)
45 hid_service_ = device::HidService::Create(); 43 hid_service_ = device::HidService::Create();
46 #endif 44 #endif
47 return hid_service_.get(); 45 return hid_service_.get();
48 } 46 }
OLDNEW
« no previous file with comments | « no previous file | device/hid/hid_connection_unittest.cc » ('j') | device/hid/hid_connection_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698