diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-23 21:44:57 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-23 21:44:57 +0000 |
commit | c9d8113703584a262972858475a560c78733a7dd (patch) | |
tree | 89fdd28a63032b7c1277c2fcd39f111a2522db91 /chrome | |
parent | 40e93e58ffd857435bfd509772a621efea1e8746 (diff) | |
download | chromium_src-c9d8113703584a262972858475a560c78733a7dd.zip chromium_src-c9d8113703584a262972858475a560c78733a7dd.tar.gz chromium_src-c9d8113703584a262972858475a560c78733a7dd.tar.bz2 |
Convert WebPluginInfo from wstring to string16
BUG=None
TEST=No behavioral change; plugins should continue to work.
Review URL: http://codereview.chromium.org/2866014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 8 | ||||
-rw-r--r-- | chrome/browser/dom_ui/plugins_ui.cc | 12 | ||||
-rw-r--r-- | chrome/browser/metrics/metrics_log.cc | 4 | ||||
-rw-r--r-- | chrome/browser/plugin_process_host.cc | 4 | ||||
-rw-r--r-- | chrome/plugin/plugin_thread.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/webplugin_delegate_proxy.cc | 6 |
6 files changed, 18 insertions, 18 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 8c4b548..1630f14a 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -2105,10 +2105,10 @@ void AutomationProvider::GetPluginsInfo(Browser* browser, it != plugins.end(); ++it) { DictionaryValue* item = new DictionaryValue; - item->SetString(L"name", it->name); + item->SetStringFromUTF16(L"name", it->name); item->SetString(L"path", it->path.value()); - item->SetString(L"version", it->version); - item->SetString(L"desc", it->desc); + item->SetStringFromUTF16(L"version", it->version); + item->SetStringFromUTF16(L"desc", it->desc); item->SetBoolean(L"enabled", it->enabled); // Add info about mime types. ListValue* mime_types = new ListValue(); @@ -2118,7 +2118,7 @@ void AutomationProvider::GetPluginsInfo(Browser* browser, ++type_it) { DictionaryValue* mime_type = new DictionaryValue(); mime_type->SetString(L"mimeType", type_it->mime_type); - mime_type->SetString(L"description", type_it->description); + mime_type->SetStringFromUTF16(L"description", type_it->description); ListValue* file_extensions = new ListValue(); for (std::vector<std::string>::const_iterator ext_it = diff --git a/chrome/browser/dom_ui/plugins_ui.cc b/chrome/browser/dom_ui/plugins_ui.cc index b24a902..d14df5c 100644 --- a/chrome/browser/dom_ui/plugins_ui.cc +++ b/chrome/browser/dom_ui/plugins_ui.cc @@ -220,9 +220,9 @@ DictionaryValue* PluginsDOMHandler::CreatePluginDetailValue( const WebPluginInfo& plugin) { DictionaryValue* plugin_data = new DictionaryValue(); plugin_data->SetString(L"path", plugin.path.value()); - plugin_data->SetString(L"name", plugin.name); - plugin_data->SetString(L"version", plugin.version); - plugin_data->SetString(L"description", plugin.desc); + plugin_data->SetStringFromUTF16(L"name", plugin.name); + plugin_data->SetStringFromUTF16(L"version", plugin.version); + plugin_data->SetStringFromUTF16(L"description", plugin.desc); plugin_data->SetBoolean(L"enabled", plugin.enabled); ListValue* mime_types = new ListValue(); @@ -232,7 +232,7 @@ DictionaryValue* PluginsDOMHandler::CreatePluginDetailValue( ++type_it) { DictionaryValue* mime_type = new DictionaryValue(); mime_type->SetString(L"mimeType", type_it->mime_type); - mime_type->SetString(L"description", type_it->description); + mime_type->SetStringFromUTF16(L"description", type_it->description); ListValue* file_extensions = new ListValue(); for (std::vector<std::string>::const_iterator ext_it = @@ -254,8 +254,8 @@ DictionaryValue* PluginsDOMHandler::CreatePluginSummaryValue( const WebPluginInfo& plugin) { DictionaryValue* plugin_data = new DictionaryValue(); plugin_data->SetString(L"path", plugin.path.value()); - plugin_data->SetString(L"name", plugin.name); - plugin_data->SetString(L"version", plugin.version); + plugin_data->SetStringFromUTF16(L"name", plugin.name); + plugin_data->SetStringFromUTF16(L"version", plugin.version); plugin_data->SetBoolean(L"enabled", plugin.enabled); return plugin_data; } diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc index f638857f..219d686 100644 --- a/chrome/browser/metrics/metrics_log.cc +++ b/chrome/browser/metrics/metrics_log.cc @@ -244,10 +244,10 @@ void MetricsLog::WritePluginList( // Plugin name and filename are hashed for the privacy of those // testing unreleased new extensions. - WriteAttribute("name", CreateBase64Hash(WideToUTF8(iter->name))); + WriteAttribute("name", CreateBase64Hash(UTF16ToUTF8(iter->name))); WriteAttribute("filename", CreateBase64Hash(WideToUTF8(iter->path.BaseName().ToWStringHack()))); - WriteAttribute("version", WideToUTF8(iter->version)); + WriteAttribute("version", UTF16ToUTF8(iter->version)); } } diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index e12a575..409d6c0 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -342,8 +342,8 @@ PluginProcessHost::~PluginProcessHost() { bool PluginProcessHost::Init(const WebPluginInfo& info, const std::wstring& locale) { info_ = info; - set_name(info_.name); - set_version(info_.version); + set_name(UTF16ToWideHack(info_.name)); + set_version(UTF16ToWideHack(info_.version)); if (!CreateChannel()) return false; diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc index 774780c..1ae410e 100644 --- a/chrome/plugin/plugin_thread.cc +++ b/chrome/plugin/plugin_thread.cc @@ -102,7 +102,7 @@ PluginThread::PluginThread() plugin->NP_Initialize(); #if defined(OS_MACOSX) - scoped_cftyperef<CFStringRef> plugin_name(base::SysWideToCFStringRef( + scoped_cftyperef<CFStringRef> plugin_name(base::SysUTF16ToCFStringRef( plugin->plugin_info().name)); scoped_cftyperef<CFStringRef> app_name(base::SysUTF16ToCFStringRef( l10n_util::GetStringUTF16(IDS_SHORT_PLUGIN_APP_NAME))); diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index ab21bbe9..8b4068c 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -342,8 +342,8 @@ bool WebPluginDelegateProxy::Initialize(const GURL& url, // expensive extra copy for us). if (!transparent_ && mime_type_ == "application/x-shockwave-flash") { bool force_opaque_mode = false; - if (StartsWith(info_.version, L"10.0", false) || - StartsWith(info_.version, L"9.", false)) { + if (StartsWith(info_.version, ASCIIToUTF16("10.0"), false) || + StartsWith(info_.version, ASCIIToUTF16("9."), false)) { // Older versions of Flash don't support CA (and they assume QuickDraw // support, so we can't rely on negotiation to do the right thing). force_opaque_mode = true; @@ -1542,7 +1542,7 @@ bool WebPluginDelegateProxy::UseSynchronousGeometryUpdates() { // Need to update geometry synchronously with WMP, otherwise if a site // scripts the plugin to start playing while it's in the middle of handling // an update geometry message, videos don't play. See urls in bug 20260. - if (info_.name.find(L"Windows Media Player") != std::wstring::npos) + if (info_.name.find(ASCIIToUTF16("Windows Media Player")) != string16::npos) return true; // The move networks plugin needs to be informed of geometry updates |