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

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

Issue 1172753003: Move LowerCaseEqualsASCII to base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util
Patch Set: Created 5 years, 6 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/base/l10n/l10n_util_win.cc ('k') | ui/gfx/render_text_harfbuzz.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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 StartsWithASCII(match_type, "MatchIs", true); 508 return StartsWithASCII(match_type, "MatchIs", true);
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 (LowerCaseEqualsASCII(value, kTrue[i])) 514 if (base::LowerCaseEqualsASCII(value, kTrue[i]))
515 return 1; 515 return 1;
516 for (size_t i = 0; i < arraysize(kFalse); ++i) 516 }
517 if (LowerCaseEqualsASCII(value, kFalse[i])) 517 for (size_t i = 0; i < arraysize(kFalse); ++i) {
518 if (base::LowerCaseEqualsASCII(value, kFalse[i]))
518 return -1; 519 return -1;
520 }
519 return 0; 521 return 0;
520 } 522 }
521 523
522 // Log the value of an array property. 524 // Log the value of an array property.
523 template <typename T> 525 template <typename T>
524 void LogArrayProperty(std::ostream& os, const std::vector<T>& value) { 526 void LogArrayProperty(std::ostream& os, const std::vector<T>& value) {
525 os << "("; 527 os << "(";
526 for (size_t i = 0; i < value.size(); ++i) { 528 for (size_t i = 0; i < value.size(); ++i) {
527 if (i > 0) 529 if (i > 0)
528 os << ", "; 530 os << ", ";
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 const GesturesPropProvider kGesturePropProvider = { 1541 const GesturesPropProvider kGesturePropProvider = {
1540 GesturesPropFunctionsWrapper::CreateInt, 1542 GesturesPropFunctionsWrapper::CreateInt,
1541 GesturesPropFunctionsWrapper::CreateShort, 1543 GesturesPropFunctionsWrapper::CreateShort,
1542 GesturesPropFunctionsWrapper::CreateBool, 1544 GesturesPropFunctionsWrapper::CreateBool,
1543 GesturesPropFunctionsWrapper::CreateString, 1545 GesturesPropFunctionsWrapper::CreateString,
1544 GesturesPropFunctionsWrapper::CreateReal, 1546 GesturesPropFunctionsWrapper::CreateReal,
1545 GesturesPropFunctionsWrapper::RegisterHandlers, 1547 GesturesPropFunctionsWrapper::RegisterHandlers,
1546 GesturesPropFunctionsWrapper::Free}; 1548 GesturesPropFunctionsWrapper::Free};
1547 1549
1548 } // namespace ui 1550 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/l10n/l10n_util_win.cc ('k') | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698