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

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

Issue 1925453003: Fix fnl/ozone build. (Closed) Base URL: https://github.com/domokit/mojo.git@fix3
Patch Set: rebased Created 4 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
« 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/touch_event_converter_evdev.cc
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev.cc b/ui/events/ozone/evdev/touch_event_converter_evdev.cc
index 0c9be25f2b702d21ecd225220ddd0f57c844b56e..28681fe0e93b22424b357ec23f70b0ec4556888e 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev.cc
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev.cc
@@ -21,6 +21,7 @@
#include "base/memory/scoped_vector.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h"
@@ -46,10 +47,12 @@ struct TouchCalibration {
};
void GetTouchCalibration(TouchCalibration* cal) {
- std::vector<std::string> parts;
- if (Tokenize(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kTouchCalibration),
- ",", &parts) >= 4) {
+ std::vector<std::string> parts = base::SplitString(
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kTouchCalibration),
+ ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
+
+ if (parts.size() >= 4) {
if (!base::StringToInt(parts[0], &cal->bezel_left))
LOG(ERROR) << "Incorrect left border calibration value passed.";
if (!base::StringToInt(parts[1], &cal->bezel_right))
« 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