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

Side by Side Diff: ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 years, 5 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
« no previous file with comments | « ui/events/ozone/device/udev/device_manager_udev.cc ('k') | ui/gl/gl_version_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.h" 5 #include "ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.h"
6 6
7 #include <gestures/gestures.h> 7 #include <gestures/gestures.h>
8 #include <libevdev/libevdev.h> 8 #include <libevdev/libevdev.h>
9 9
10 #include <fnmatch.h> 10 #include <fnmatch.h>
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 LOG(ERROR) << "Unsupported gestures input class match type: " 498 LOG(ERROR) << "Unsupported gestures input class match type: "
499 << match_type; 499 << match_type;
500 return false; 500 return false;
501 } 501 }
502 } 502 }
503 return false; 503 return false;
504 } 504 }
505 505
506 // Check if a match criteria is a device type one. 506 // Check if a match criteria is a device type one.
507 bool IsMatchDeviceType(const std::string& match_type) { 507 bool IsMatchDeviceType(const std::string& match_type) {
508 return base::StartsWithASCII(match_type, "MatchIs", true); 508 return base::StartsWith(match_type, "MatchIs", base::CompareCase::SENSITIVE);
509 } 509 }
510 510
511 // Parse a boolean value keyword (e.g., on/off, true/false). 511 // Parse a boolean value keyword (e.g., on/off, true/false).
512 int ParseBooleanKeyword(const std::string& value) { 512 int ParseBooleanKeyword(const std::string& value) {
513 for (size_t i = 0; i < arraysize(kTrue); ++i) { 513 for (size_t i = 0; i < arraysize(kTrue); ++i) {
514 if (base::LowerCaseEqualsASCII(value, kTrue[i])) 514 if (base::LowerCaseEqualsASCII(value, kTrue[i]))
515 return 1; 515 return 1;
516 } 516 }
517 for (size_t i = 0; i < arraysize(kFalse); ++i) { 517 for (size_t i = 0; i < arraysize(kFalse); ++i) {
518 if (base::LowerCaseEqualsASCII(value, kFalse[i])) 518 if (base::LowerCaseEqualsASCII(value, kFalse[i]))
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 const GesturesPropProvider kGesturePropProvider = { 1542 const GesturesPropProvider kGesturePropProvider = {
1543 GesturesPropFunctionsWrapper::CreateInt, 1543 GesturesPropFunctionsWrapper::CreateInt,
1544 GesturesPropFunctionsWrapper::CreateShort, 1544 GesturesPropFunctionsWrapper::CreateShort,
1545 GesturesPropFunctionsWrapper::CreateBool, 1545 GesturesPropFunctionsWrapper::CreateBool,
1546 GesturesPropFunctionsWrapper::CreateString, 1546 GesturesPropFunctionsWrapper::CreateString,
1547 GesturesPropFunctionsWrapper::CreateReal, 1547 GesturesPropFunctionsWrapper::CreateReal,
1548 GesturesPropFunctionsWrapper::RegisterHandlers, 1548 GesturesPropFunctionsWrapper::RegisterHandlers,
1549 GesturesPropFunctionsWrapper::Free}; 1549 GesturesPropFunctionsWrapper::Free};
1550 1550
1551 } // namespace ui 1551 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/device/udev/device_manager_udev.cc ('k') | ui/gl/gl_version_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698