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

Unified Diff: webkit/plugins/npapi/plugin_group.cc

Issue 7037014: wstring: remove wstring version of RemoveChars (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ugh Created 9 years, 7 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 | « base/string_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/plugin_group.cc
diff --git a/webkit/plugins/npapi/plugin_group.cc b/webkit/plugins/npapi/plugin_group.cc
index 537b2046bae7d8e120ce9775a44fd27fdc2b4706..3c8b73ff8c4375ebcc3299407f06559f8b9562de 100644
--- a/webkit/plugins/npapi/plugin_group.cc
+++ b/webkit/plugins/npapi/plugin_group.cc
@@ -244,15 +244,15 @@ bool PluginGroup::Match(const WebPluginInfo& plugin) const {
Version* PluginGroup::CreateVersionFromString(const string16& version_string) {
// Remove spaces and ')' from the version string,
// Replace any instances of 'r', ',' or '(' with a dot.
- std::wstring version = UTF16ToWide(version_string);
- RemoveChars(version, L") ", &version);
+ std::string version = UTF16ToASCII(version_string);
+ RemoveChars(version, ") ", &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(), '(', '.');
std::replace(version.begin(), version.end(), '_', '.');
- return Version::GetVersionFromString(WideToASCII(version));
+ return Version::GetVersionFromString(version);
}
void PluginGroup::UpdateActivePlugin(const WebPluginInfo& plugin) {
« no previous file with comments | « base/string_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698