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

Unified Diff: chrome/browser/ui/webui/fileicon_source.cc

Issue 1136283007: Use base::StringPairs together with SplitStringIntoKeyValuePairs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/fileicon_source.cc
diff --git a/chrome/browser/ui/webui/fileicon_source.cc b/chrome/browser/ui/webui/fileicon_source.cc
index bfdb95c155cb191715d6140d84f018d1aed3c4d9..923656521d599d1e9e5366cee4ac713caa7e3389 100644
--- a/chrome/browser/ui/webui/fileicon_source.cc
+++ b/chrome/browser/ui/webui/fileicon_source.cc
@@ -63,14 +63,13 @@ IconLoader::IconSize SizeStringToIconSize(const std::string& size_string) {
void ParseQueryParams(const std::string& query,
float* scale_factor,
IconLoader::IconSize* icon_size) {
- typedef std::pair<std::string, std::string> KVPair;
- std::vector<KVPair> parameters;
+ base::StringPairs parameters;
if (icon_size)
*icon_size = IconLoader::NORMAL;
if (scale_factor)
*scale_factor = 1.0f;
base::SplitStringIntoKeyValuePairs(query, '=', '&', &parameters);
- for (std::vector<KVPair>::const_iterator iter = parameters.begin();
+ for (base::StringPairs::const_iterator iter = parameters.begin();
iter != parameters.end(); ++iter) {
if (icon_size && iter->first == kIconSize)
*icon_size = SizeStringToIconSize(iter->second);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698