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

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: Fixed unit tests. Created 9 years, 11 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
Index: chrome/common/pepper_plugin_registry.cc
diff --git a/chrome/common/pepper_plugin_registry.cc b/chrome/common/pepper_plugin_registry.cc
index 053d897235dba5576857af0476ae5d9c5095f253..4a49827b3ca236ddd6a0e34f89475e1a4c37ac6d 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