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

Unified Diff: webkit/glue/plugins/plugin_lib.cc

Issue 17367: Fix layout test failures. Looks like keying the plugins based on OriginalFil... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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: webkit/glue/plugins/plugin_lib.cc
===================================================================
--- webkit/glue/plugins/plugin_lib.cc (revision 7888)
+++ webkit/glue/plugins/plugin_lib.cc (working copy)
@@ -33,8 +33,7 @@
static const InternalPluginInfo g_internal_plugins[] = {
{
- {kActiveXShimFileName,
- kActiveXShimFileName,
+ {FilePath(kActiveXShimFileName),
L"ActiveX Plug-in",
L"ActiveX Plug-in provides a shim to support ActiveX controls",
L"1, 0, 0, 1",
@@ -47,9 +46,8 @@
activex_shim::ActiveX_Shim_NP_Shutdown
},
{
- {kActivexShimFileNameForMediaPlayer,
+ {FilePath(kActivexShimFileNameForMediaPlayer),
kActivexShimFileNameForMediaPlayer,
- kActivexShimFileNameForMediaPlayer,
L"Windows Media Player",
L"1, 0, 0, 1",
L"application/x-ms-wmp|application/asx|video/x-ms-asf-plugin|"
@@ -63,8 +61,7 @@
activex_shim::ActiveX_Shim_NP_Shutdown
},
{
- {kDefaultPluginLibraryName,
- kDefaultPluginLibraryName,
+ {FilePath(kDefaultPluginLibraryName),
L"Default Plug-in",
L"Provides functionality for installing third-party plug-ins",
L"1, 0, 0, 1",
@@ -129,9 +126,8 @@
g_loaded_libs->push_back(this);
internal_ = false;
- std::wstring wide_filename = UTF8ToWide(info.filename);
for (int i = 0; i < arraysize(g_internal_plugins); ++i) {
- if (wide_filename == g_internal_plugins[i].version_info.filename) {
+ if (info.path == g_internal_plugins[i].version_info.path) {
internal_ = true;
NP_Initialize_ = g_internal_plugins[i].np_initialize;
NP_GetEntryPoints_ = g_internal_plugins[i].np_getentrypoints;
@@ -345,7 +341,6 @@
info->name = pvi.product_name;
info->desc = pvi.file_description;
info->version = pvi.file_version;
- info->filename = WideToUTF8(pvi.filename);
info->path = FilePath(pvi.path);
for (size_t i = 0; i < mime_types.size(); ++i) {
@@ -377,7 +372,7 @@
bool PluginLib::ReadWebPluginInfo(const FilePath &filename,
WebPluginInfo* info) {
for (int i = 0; i < arraysize(g_internal_plugins); ++i) {
- if (filename.value() == g_internal_plugins[i].version_info.filename)
+ if (filename == g_internal_plugins[i].version_info.path)
return CreateWebPluginInfo(g_internal_plugins[i].version_info, info);
}
@@ -391,18 +386,14 @@
if (!version_info.get())
return false;
- std::wstring original_filename = version_info->original_filename();
- std::wstring file_version = version_info->file_version();
-
PluginVersionInfo pvi;
version_info->GetValue(L"MIMEType", &pvi.mime_types);
version_info->GetValue(L"FileExtents", &pvi.file_extents);
version_info->GetValue(L"FileOpenName", &pvi.file_open_names);
pvi.product_name = version_info->product_name();
pvi.file_description = version_info->file_description();
- pvi.file_version = file_version;
- pvi.filename = original_filename;
- pvi.path = filename.value();
+ pvi.file_version = version_info->file_version();
+ pvi.path = filename;
return CreateWebPluginInfo(pvi, info);
}

Powered by Google App Engine
This is Rietveld 408576698