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

Unified Diff: chrome/browser/extensions/plugin_manager.cc

Issue 856393002: Fix for plugin id is showing instead of plugin path in chrome://plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/plugin_manager.cc
diff --git a/chrome/browser/extensions/plugin_manager.cc b/chrome/browser/extensions/plugin_manager.cc
index 3676bdb78bcf6a53cf739b4de2b7f31ac8135616..0dcbe0cf97e1a06b5285a5a27baa46ac7416c718 100644
--- a/chrome/browser/extensions/plugin_manager.cc
+++ b/chrome/browser/extensions/plugin_manager.cc
@@ -23,6 +23,9 @@
#include "components/nacl/common/nacl_constants.h"
#endif
+const char kPDFPluginExtension[] = "pdf";
+const char kPDFPluginDescription[] = "Portable Document Format";
+
using content::PluginService;
namespace extensions {
@@ -90,7 +93,8 @@ void PluginManager::OnExtensionLoaded(content::BrowserContext* browser_context,
content::WebPluginInfo info;
info.type = content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN;
info.name = base::UTF8ToUTF16(extension->name());
- info.path = base::FilePath::FromUTF8Unsafe(handler->extension_id());
+ info.path = extension->path();
raymes 2015/01/22 03:23:40 The path is sort of unimportant. We could display
+ info.version = base::UTF8ToUTF16(extension->GetVersionForDisplay());
raymes 2015/01/22 03:23:40 Since this is bundled with Chrome, let's not versi
for (std::set<std::string>::const_iterator mime_type =
handler->mime_type_set().begin();
@@ -99,8 +103,13 @@ void PluginManager::OnExtensionLoaded(content::BrowserContext* browser_context,
mime_type_info.mime_type = *mime_type;
base::FilePath::StringType file_extension;
if (net::GetPreferredExtensionForMimeType(*mime_type, &file_extension)) {
- mime_type_info.file_extensions.push_back(
- base::FilePath(file_extension).AsUTF8Unsafe());
+ std::string mime_file_extension =
+ base::FilePath(file_extension).AsUTF8Unsafe();
+ mime_type_info.file_extensions.push_back(mime_file_extension);
+ if (!mime_file_extension.compare(std::string(kPDFPluginExtension))) {
+ mime_type_info.description =
+ base::UTF8ToUTF16(std::string(kPDFPluginDescription));
+ }
raymes 2015/01/22 03:23:40 We don't need to have a description (there current
}
info.mime_types.push_back(mime_type_info);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698