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

Unified Diff: content/common/plugin_list_win.cc

Issue 1272823003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « content/common/plugin_list.cc ('k') | content/public/browser/desktop_media_id.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/plugin_list_win.cc
diff --git a/content/common/plugin_list_win.cc b/content/common/plugin_list_win.cc
index 6c95a0db006b7dfc9a7edc92e76feb946c0c6db7..98694a2466c0abfef3566c55f2e2e288fc4717a8 100644
--- a/content/common/plugin_list_win.cc
+++ b/content/common/plugin_list_win.cc
@@ -237,12 +237,15 @@ bool HaveSharedMimeType(const WebPluginInfo& plugin1,
// Compares Windows style version strings (i.e. 1,2,3,4). Returns true if b's
// version is newer than a's, or false if it's equal or older.
bool IsNewerVersion(const base::string16& a, const base::string16& b) {
- std::vector<base::string16> a_ver, b_ver;
- base::SplitString(a, ',', &a_ver);
- base::SplitString(b, ',', &b_ver);
+ std::vector<base::string16> a_ver = base::SplitString(
+ a, base::string16(1, ','), base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+ std::vector<base::string16> b_ver = base::SplitString(
+ b, base::string16(1, ','), base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
if (a_ver.size() == 1 && b_ver.size() == 1) {
- base::SplitString(a, '.', &a_ver);
- base::SplitString(b, '.', &b_ver);
+ a_ver = base::SplitString(
+ a, base::string16(1, '.'), base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+ b_ver = base::SplitString(
+ b, base::string16(1, '.'), base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
}
if (a_ver.size() != b_ver.size())
return false;
@@ -442,8 +445,9 @@ bool PluginList::ShouldLoadPluginUsingPluginList(
// We only work with newer versions of the Java plugin which use NPAPI only
// and don't depend on XPCOM.
if (filename == kJavaPlugin1 || filename == kJavaPlugin2) {
- std::vector<base::FilePath::StringType> ver;
- base::SplitString(info.version, '.', &ver);
+ std::vector<base::FilePath::StringType> ver = base::SplitString(
+ info.version, base::FilePath::StringType(1, '.'),
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
int major, minor, update;
if (ver.size() == 4 &&
base::StringToInt(ver[0], &major) &&
« no previous file with comments | « content/common/plugin_list.cc ('k') | content/public/browser/desktop_media_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698