diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-21 00:09:11 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-21 00:09:11 +0000 |
commit | 734017f67f877dfd9864155cc58c33aba11e2258 (patch) | |
tree | 515626b92120b37b2ccb89a80d81e0a54e24767f /webkit | |
parent | 889ed35c19ee60345cd6d5ededfd2c8d2fd01cd0 (diff) | |
download | chromium_src-734017f67f877dfd9864155cc58c33aba11e2258.zip chromium_src-734017f67f877dfd9864155cc58c33aba11e2258.tar.gz chromium_src-734017f67f877dfd9864155cc58c33aba11e2258.tar.bz2 |
Take out static objects from plugin_lib_win.cc.
Review URL: http://codereview.chromium.org/18389
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8343 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/plugin_lib_win.cc | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/webkit/glue/plugins/plugin_lib_win.cc b/webkit/glue/plugins/plugin_lib_win.cc index f1c2944..a2ef7ef 100644 --- a/webkit/glue/plugins/plugin_lib_win.cc +++ b/webkit/glue/plugins/plugin_lib_win.cc @@ -29,13 +29,13 @@ namespace NPAPI // the version info of the dll; For internal plugins, it's predefined and // includes addresses of entry functions. struct PluginVersionInfo { - std::wstring path; - std::wstring product_name; - std::wstring file_description; - std::wstring file_version; - std::wstring mime_types; - std::wstring file_extents; - std::wstring file_open_names; + const wchar_t* path; + const wchar_t* product_name; + const wchar_t* file_description; + const wchar_t* file_version; + const wchar_t* mime_types; + const wchar_t* file_extents; + const wchar_t* file_open_names; NP_GetEntryPointsFunc np_getentrypoints; NP_InitializeFunc np_initialize; NP_ShutdownFunc np_shutdown; @@ -208,14 +208,22 @@ bool PluginLib::ReadWebPluginInfo(const FilePath &filename, if (!version_info.get()) return false; + std::wstring mime_types = version_info->GetStringValue(L"MIMEType"); + std::wstring file_extents = version_info->GetStringValue(L"FileExtents"); + std::wstring file_open_names = version_info->GetStringValue(L"FileOpenName"); + std::wstring product_name = version_info->product_name(); + std::wstring file_description = version_info->file_description(); + std::wstring file_version = version_info->file_version(); + std::wstring path = filename.value(); + 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 = version_info->file_version(); - pvi.path = filename.value(); + pvi.mime_types = mime_types.c_str(); + pvi.file_extents = file_extents.c_str(); + pvi.file_open_names = file_open_names.c_str(); + pvi.product_name = product_name.c_str(); + pvi.file_description = file_description.c_str(); + pvi.file_version = file_version.c_str(); + pvi.path = path.c_str(); pvi.np_getentrypoints = NULL; pvi.np_initialize = NULL; pvi.np_shutdown = NULL; |