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

Unified Diff: chrome/common/pepper_flash.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/common/importer/firefox_importer_utils.cc ('k') | chrome/common/secure_origin_whitelist.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/pepper_flash.cc
diff --git a/chrome/common/pepper_flash.cc b/chrome/common/pepper_flash.cc
index da1c00de65519dee1f77c0f9d5d7011c836b91ac..16b4328d933e4818d02ca33e1672ee1bd4be4ec0 100644
--- a/chrome/common/pepper_flash.cc
+++ b/chrome/common/pepper_flash.cc
@@ -56,10 +56,10 @@ bool SupportsPepperInterface(const char* interface_name) {
// Returns true if this browser implements one of the interfaces given in
// |interface_string|, which is a '|'-separated string of interface names.
bool CheckPepperFlashInterfaceString(const std::string& interface_string) {
- std::vector<std::string> interface_names;
- base::SplitString(interface_string, '|', &interface_names);
- for (size_t i = 0; i < interface_names.size(); i++) {
- if (SupportsPepperInterface(interface_names[i].c_str()))
+ for (const std::string& name : base::SplitString(
+ interface_string, "|",
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
+ if (SupportsPepperInterface(name.c_str()))
return true;
}
return false;
« no previous file with comments | « chrome/common/importer/firefox_importer_utils.cc ('k') | chrome/common/secure_origin_whitelist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698