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

Unified Diff: ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc

Issue 2356253006: Make SplitStringUsingSubstr have consistent args. (Closed)
Patch Set: Created 4 years, 3 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 | « net/ftp/ftp_directory_listing_parser_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc b/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc
index a5be6fd3bfc6347a554e404e31e8b4ae5412af07..0a4cf0bb14aa23108ec5cdd7fd020baf2a237f74 100644
--- a/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc
@@ -1036,16 +1036,17 @@ void GesturePropertyProvider::ParseXorgConfFile(const std::string& content) {
// Sections are delimited by the "EndSection" keyword.
// Lines are delimited by "\n".
// Pieces are delimited by all white-spaces.
- std::vector<std::string> sections;
- base::SplitStringUsingSubstr(content, "EndSection", &sections);
- for (size_t i = 0; i < sections.size(); ++i) {
+ for (const std::string& section :
+ base::SplitStringUsingSubstr(content, "EndSection",
+ base::TRIM_WHITESPACE,
+ base::SPLIT_WANT_ALL)) {
// Create a new configuration section.
configurations_.push_back(
base::MakeUnique<internal::ConfigurationSection>());
internal::ConfigurationSection* config = configurations_.back().get();
// Break the section into lines.
- base::StringTokenizer lines(sections[i], "\n");
+ base::StringTokenizer lines(section, "\n");
bool is_input_class_section = true;
bool has_checked_section_type = false;
while (is_input_class_section && lines.GetNext()) {
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698