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

Unified Diff: chrome/common/pepper_plugin_registry.cc

Issue 5699005: Policy: Re-enabled plugin still disabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up WebPluginInfo and rebased on fixed PluginGroup::InitFrom. Created 10 years 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
Index: chrome/common/pepper_plugin_registry.cc
diff --git a/chrome/common/pepper_plugin_registry.cc b/chrome/common/pepper_plugin_registry.cc
index 5223e55f281e1f969aee6d4a248df1b7d4909e8e..bd36ba3f5730936d5904d57b8e10cf5e06625ec5 100644
--- a/chrome/common/pepper_plugin_registry.cc
+++ b/chrome/common/pepper_plugin_registry.cc
@@ -121,6 +121,18 @@ void PepperPluginRegistry::GetPluginInfoFromSwitch(
for (size_t j = 1; j < parts.size(); ++j)
plugin.mime_types.push_back(parts[j]);
+ // Empty description is not allowed so use the plugin base name if none is
+ // provided.
+ if (plugin.type_descriptions.length() == 0) {
+#if defined(OS_WIN)
+ plugin.type_descriptions =
+ UTF16ToUTF8(plugin.path.BaseName().RemoveExtension().value());
+#else
+ plugin.type_descriptions =
+ plugin.path.BaseName().RemoveExtension().value();
+#endif
+ }
+
plugins->push_back(plugin);
}
}

Powered by Google App Engine
This is Rietveld 408576698