summaryrefslogtreecommitdiffstats
path: root/device/hid/hid_connection_linux.cc
diff options
context:
space:
mode:
authorreillyg <reillyg@chromium.org>2015-01-12 14:05:43 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-12 22:06:35 +0000
commit3497d226e1a9032b511167962cb1b98a1062adaf (patch)
tree8d02b91670d1936dd280edbf89293192dcf93e91 /device/hid/hid_connection_linux.cc
parentfec4eb7f6153a2075546b5dafc7e8f7d7de983b0 (diff)
downloadchromium_src-3497d226e1a9032b511167962cb1b98a1062adaf.zip
chromium_src-3497d226e1a9032b511167962cb1b98a1062adaf.tar.gz
chromium_src-3497d226e1a9032b511167962cb1b98a1062adaf.tar.bz2
Rename HidServiceLinux and HidConnectionLinux helper classes.
This change documents that these helper classes live on the FILE thread by naming them HidServiceLinux::FileThreadHelper and HidConnectionLinux::FileThreadHelper. BUG= Review URL: https://codereview.chromium.org/851543002 Cr-Commit-Position: refs/heads/master@{#311120}
Diffstat (limited to 'device/hid/hid_connection_linux.cc')
-rw-r--r--device/hid/hid_connection_linux.cc23
1 files changed, 13 insertions, 10 deletions
diff --git a/device/hid/hid_connection_linux.cc b/device/hid/hid_connection_linux.cc
index e9ca4b2..c653f4b 100644
--- a/device/hid/hid_connection_linux.cc
+++ b/device/hid/hid_connection_linux.cc
@@ -29,12 +29,13 @@
namespace device {
-class HidConnectionLinux::Helper : public base::MessagePumpLibevent::Watcher {
+class HidConnectionLinux::FileThreadHelper
+ : public base::MessagePumpLibevent::Watcher {
public:
- Helper(base::PlatformFile platform_file,
- scoped_refptr<HidDeviceInfo> device_info,
- base::WeakPtr<HidConnectionLinux> connection,
- scoped_refptr<base::SingleThreadTaskRunner> task_runner)
+ FileThreadHelper(base::PlatformFile platform_file,
+ scoped_refptr<HidDeviceInfo> device_info,
+ base::WeakPtr<HidConnectionLinux> connection,
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: platform_file_(platform_file),
connection_(connection),
task_runner_(task_runner) {
@@ -43,7 +44,9 @@ class HidConnectionLinux::Helper : public base::MessagePumpLibevent::Watcher {
has_report_id_ = device_info->has_report_id();
}
- ~Helper() override { DCHECK(thread_checker_.CalledOnValidThread()); }
+ ~FileThreadHelper() override {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ }
// Starts the FileDescriptorWatcher that reads input events from the device.
// Must be called on a thread that has a base::MessageLoopForIO. The helper
@@ -122,10 +125,10 @@ HidConnectionLinux::HidConnectionLinux(
// The helper is passed a weak pointer to this connection so that it can be
// cleaned up after the connection is closed.
- helper_ = new Helper(device_file_.GetPlatformFile(), device_info,
- weak_factory_.GetWeakPtr(), task_runner_);
- file_task_runner_->PostTask(
- FROM_HERE, base::Bind(&Helper::Start, base::Unretained(helper_)));
+ helper_ = new FileThreadHelper(device_file_.GetPlatformFile(), device_info,
+ weak_factory_.GetWeakPtr(), task_runner_);
+ file_task_runner_->PostTask(FROM_HERE, base::Bind(&FileThreadHelper::Start,
+ base::Unretained(helper_)));
}
HidConnectionLinux::~HidConnectionLinux() {