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

Unified Diff: device/hid/hid_service_linux.cc

Issue 1312993008: Manage HidService lifetime in DeviceClient implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_usb_service_get_instance
Patch Set: Created 5 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 | « device/hid/hid_service_linux.h ('k') | device/hid/hid_service_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/hid/hid_service_linux.cc
diff --git a/device/hid/hid_service_linux.cc b/device/hid/hid_service_linux.cc
index e6e09f2829f758599d828f1e055915cbf727e20d..ec36b35385ecbc69ac4c08998b4e0b091932bb47 100644
--- a/device/hid/hid_service_linux.cc
+++ b/device/hid/hid_service_linux.cc
@@ -212,6 +212,10 @@ HidServiceLinux::HidServiceLinux(
FROM_HERE, base::Bind(&FileThreadHelper::Start, base::Passed(&helper)));
}
+HidServiceLinux::~HidServiceLinux() {
+ file_task_runner_->DeleteSoon(FROM_HERE, helper_);
+}
+
void HidServiceLinux::Connect(const HidDeviceId& device_id,
const ConnectCallback& callback) {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -241,10 +245,6 @@ void HidServiceLinux::Connect(const HidDeviceId& device_id,
#endif // defined(OS_CHROMEOS)
}
-HidServiceLinux::~HidServiceLinux() {
- file_task_runner_->DeleteSoon(FROM_HERE, helper_);
-}
-
#if defined(OS_CHROMEOS)
// static
« no previous file with comments | « device/hid/hid_service_linux.h ('k') | device/hid/hid_service_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698