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

Unified Diff: chrome/browser/component_updater/widevine_cdm_component_installer.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/chromeos/preferences_unittest.cc ('k') | chrome/browser/download/download_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/widevine_cdm_component_installer.cc
diff --git a/chrome/browser/component_updater/widevine_cdm_component_installer.cc b/chrome/browser/component_updater/widevine_cdm_component_installer.cc
index 403c48785fa0dfc61c32f108c4af73b984eea785..3552617e1bd3a06722b50ffecc5084ab424f857d 100644
--- a/chrome/browser/component_updater/widevine_cdm_component_installer.cc
+++ b/chrome/browser/component_updater/widevine_cdm_component_installer.cc
@@ -156,12 +156,11 @@ bool CheckForCompatibleVersion(const base::DictionaryValue& manifest,
DLOG_IF(WARNING, versions_string.empty())
<< "Widevine CDM component manifest has empty " << version_name;
- std::vector<std::string> versions;
- base::SplitString(versions_string, kCdmValueDelimiter, &versions);
-
- for (size_t i = 0; i < versions.size(); ++i) {
+ for (const base::StringPiece& ver_str : base::SplitStringPiece(
+ versions_string, std::string(1, kCdmValueDelimiter),
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
int version = 0;
- if (base::StringToInt(versions[i], &version))
+ if (base::StringToInt(ver_str, &version))
if (version_check_func(version))
return true;
}
« no previous file with comments | « chrome/browser/chromeos/preferences_unittest.cc ('k') | chrome/browser/download/download_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698