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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 1240183002: Update SplitString calls in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/upload_list.cc ('k') | chrome/common/crash_keys.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index ce52fa34e6201d6fbac6fb4ac1efb429e50c16da..5d13f3352bd4114548e8fb46b61e8d52d7c5b0d7 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -239,13 +239,10 @@ content::PepperPluginInfo CreatePepperFlashInfo(const base::FilePath& path,
plugin.path = path;
plugin.permissions = chrome::kPepperFlashPermissions;
- std::vector<std::string> flash_version_numbers;
- base::SplitString(version, '.', &flash_version_numbers);
+ std::vector<std::string> flash_version_numbers = base::SplitString(
+ version, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
if (flash_version_numbers.size() < 1)
flash_version_numbers.push_back("11");
- // |SplitString()| puts in an empty string given an empty string. :(
- else if (flash_version_numbers[0].empty())
- flash_version_numbers[0] = "11";
if (flash_version_numbers.size() < 2)
flash_version_numbers.push_back("2");
if (flash_version_numbers.size() < 3)
« no previous file with comments | « chrome/browser/upload_list.cc ('k') | chrome/common/crash_keys.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698