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

Unified Diff: base/strings/string_split.cc

Issue 22031002: Omnibox: Create DemoteByType Experiment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix include that caused android build failure Created 7 years, 4 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 | « base/strings/string_split.h ('k') | chrome/browser/autocomplete/autocomplete_result.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_split.cc
diff --git a/base/strings/string_split.cc b/base/strings/string_split.cc
index d959fd0e66a0cb04888e8fd252a9bf7934900517..210789cd22d0df9b524d40aaeca002ad6e6fb705 100644
--- a/base/strings/string_split.cc
+++ b/base/strings/string_split.cc
@@ -80,12 +80,11 @@ bool SplitStringIntoKeyValues(
return true;
}
-bool SplitStringIntoKeyValuePairs(
- const std::string& line,
- char key_value_delimiter,
- char key_value_pair_delimiter,
- std::vector<std::pair<std::string, std::string> >* kv_pairs) {
- kv_pairs->clear();
+bool SplitStringIntoKeyValuePairs(const std::string& line,
+ char key_value_delimiter,
+ char key_value_pair_delimiter,
+ StringPairs* key_value_pairs) {
+ key_value_pairs->clear();
std::vector<std::string> pairs;
SplitString(line, key_value_pair_delimiter, &pairs);
@@ -107,7 +106,7 @@ bool SplitStringIntoKeyValuePairs(
success = false;
}
DCHECK_LE(value.size(), 1U);
- kv_pairs->push_back(
+ key_value_pairs->push_back(
make_pair(key, value.empty() ? std::string() : value[0]));
}
return success;
« no previous file with comments | « base/strings/string_split.h ('k') | chrome/browser/autocomplete/autocomplete_result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698