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

Unified Diff: ui/events/ozone/evdev/event_factory.cc

Issue 146823004: evdev: Only open /dev/input/event*[0-9] devices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/event_factory.cc
diff --git a/ui/events/ozone/evdev/event_factory.cc b/ui/events/ozone/evdev/event_factory.cc
index ddf66bf489f63408be0f9782234a7c81941bf81a..e20c4a7e370fde3a2366e1a8626b841ffab8f8d7 100644
--- a/ui/events/ozone/evdev/event_factory.cc
+++ b/ui/events/ozone/evdev/event_factory.cc
@@ -82,8 +82,10 @@ void EventFactoryEvdev::AttachInputDevice(const base::FilePath& path) {
void EventFactoryEvdev::StartProcessingEvents() {
base::ThreadRestrictions::AssertIOAllowed();
- base::FileEnumerator file_enum(
- base::FilePath("/dev/input"), false, base::FileEnumerator::FILES);
+ base::FileEnumerator file_enum(base::FilePath("/dev/input"),
+ false,
+ base::FileEnumerator::FILES,
+ "event*[0-9]");
for (base::FilePath path = file_enum.Next(); !path.empty();
path = file_enum.Next())
AttachInputDevice(path);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698