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

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

Issue 2126433002: Use container::back() and container::pop_back() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pre-increment Created 4 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
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 <fnmatch.h> 7 #include <fnmatch.h>
8 #include <gestures/gestures.h> 8 #include <gestures/gestures.h>
9 #include <libevdev/libevdev.h> 9 #include <libevdev/libevdev.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 std::string piece(pieces.token()); 1071 std::string piece(pieces.token());
1072 1072
1073 // Skip empty pieces. 1073 // Skip empty pieces.
1074 if (piece.empty()) 1074 if (piece.empty())
1075 continue; 1075 continue;
1076 1076
1077 // See if we are currently parsing an entry or are still looking for 1077 // See if we are currently parsing an entry or are still looking for
1078 // one. 1078 // one.
1079 if (is_parsing) { 1079 if (is_parsing) {
1080 // Stop parsing the current line if the format is wrong. 1080 // Stop parsing the current line if the format is wrong.
1081 if (piece.size() <= 2 || piece[0] != '\"' || 1081 if (piece.size() <= 2 || piece[0] != '\"' || piece.back() != '\"') {
1082 piece[piece.size() - 1] != '\"') {
1083 LOG(ERROR) << "Error parsing line: " << lines.token(); 1082 LOG(ERROR) << "Error parsing line: " << lines.token();
1084 has_error = true; 1083 has_error = true;
1085 if (next_is_section_type) 1084 if (next_is_section_type)
1086 is_input_class_section = false; 1085 is_input_class_section = false;
1087 break; 1086 break;
1088 } 1087 }
1089 1088
1090 // Parse the arguments. Note that we don't break even if a whitespace 1089 // Parse the arguments. Note that we don't break even if a whitespace
1091 // string is passed. It will just be handled in various ways based on 1090 // string is passed. It will just be handled in various ways based on
1092 // the entry type. 1091 // the entry type.
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 const GesturesPropProvider kGesturePropProvider = { 1545 const GesturesPropProvider kGesturePropProvider = {
1547 GesturesPropFunctionsWrapper::CreateInt, 1546 GesturesPropFunctionsWrapper::CreateInt,
1548 GesturesPropFunctionsWrapper::CreateShort, 1547 GesturesPropFunctionsWrapper::CreateShort,
1549 GesturesPropFunctionsWrapper::CreateBool, 1548 GesturesPropFunctionsWrapper::CreateBool,
1550 GesturesPropFunctionsWrapper::CreateString, 1549 GesturesPropFunctionsWrapper::CreateString,
1551 GesturesPropFunctionsWrapper::CreateReal, 1550 GesturesPropFunctionsWrapper::CreateReal,
1552 GesturesPropFunctionsWrapper::RegisterHandlers, 1551 GesturesPropFunctionsWrapper::RegisterHandlers,
1553 GesturesPropFunctionsWrapper::Free}; 1552 GesturesPropFunctionsWrapper::Free};
1554 1553
1555 } // namespace ui 1554 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/libgestures_glue/gesture_logging.cc ('k') | ui/message_center/notification_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698