summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/npapi
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-23 10:14:24 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-23 10:14:24 +0000
commitc2a1dbecacba0cc8ed64cca712103a2543636002 (patch)
tree3ec54c190eed1b978105aa30e27298b711c56e8e /webkit/plugins/npapi
parent70adeaa608e992560e949409fdd3e98130017454 (diff)
downloadchromium_src-c2a1dbecacba0cc8ed64cca712103a2543636002.zip
chromium_src-c2a1dbecacba0cc8ed64cca712103a2543636002.tar.gz
chromium_src-c2a1dbecacba0cc8ed64cca712103a2543636002.tar.bz2
Parse version string of debug Flash builds correctly.
BUG=58235 TEST=PluginGroupTest.VersionExtraction Review URL: http://codereview.chromium.org/6542057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75735 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/npapi')
-rw-r--r--webkit/plugins/npapi/plugin_group.cc1
-rw-r--r--webkit/plugins/npapi/plugin_group_unittest.cc3
2 files changed, 3 insertions, 1 deletions
diff --git a/webkit/plugins/npapi/plugin_group.cc b/webkit/plugins/npapi/plugin_group.cc
index 22fd089..dd2bb1f 100644
--- a/webkit/plugins/npapi/plugin_group.cc
+++ b/webkit/plugins/npapi/plugin_group.cc
@@ -195,6 +195,7 @@ Version* PluginGroup::CreateVersionFromString(const string16& version_string) {
// Replace any instances of 'r', ',' or '(' with a dot.
std::wstring version = UTF16ToWide(version_string);
RemoveChars(version, L") ", &version);
+ std::replace(version.begin(), version.end(), 'd', '.');
std::replace(version.begin(), version.end(), 'r', '.');
std::replace(version.begin(), version.end(), ',', '.');
std::replace(version.begin(), version.end(), '(', '.');
diff --git a/webkit/plugins/npapi/plugin_group_unittest.cc b/webkit/plugins/npapi/plugin_group_unittest.cc
index 3d37786..9c2d137 100644
--- a/webkit/plugins/npapi/plugin_group_unittest.cc
+++ b/webkit/plugins/npapi/plugin_group_unittest.cc
@@ -193,8 +193,9 @@ TEST(PluginGroupTest, VersionExtraction) {
{ "3, 0, 0, 0", "3.0.0.0" }, // Picasa
{ "1, 0, 0, 1", "1.0.0.1" }, // Earth
{ "10,0,45,2", "10.0.45.2" }, // Flash
- { "11.5.7r609", "11.5.7.609"}, // Shockwave
{ "10.1 r102", "10.1.102"}, // Flash
+ { "10.3 d180", "10.3.180" }, // Flash (Debug)
+ { "11.5.7r609", "11.5.7.609"}, // Shockwave
{ "1.6.0_22", "1.6.0.22"}, // Java
};