summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/tab_contents.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-04 17:41:00 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-04 17:41:00 +0000
commit45446a5e18df7910f64a690a5d6389b70e30f985 (patch)
tree5318a1c6e14aa8600a2d958929da77019d1ef4a8 /chrome/browser/tab_contents/tab_contents.cc
parent42d5be693f7cc623caa3df6bfb2bcc4f6861cb36 (diff)
downloadchromium_src-45446a5e18df7910f64a690a5d6389b70e30f985.zip
chromium_src-45446a5e18df7910f64a690a5d6389b70e30f985.tar.gz
chromium_src-45446a5e18df7910f64a690a5d6389b70e30f985.tar.bz2
Turn on file access checks on Win.
BUG=60211 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=64960 Review URL: http://codereview.chromium.org/4222005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/tab_contents.cc')
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc27
1 files changed, 11 insertions, 16 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 2fb3ccc..4a46eb3 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -110,6 +110,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/password_form.h"
+#include "webkit/glue/plugins/plugin_list.h"
// Cross-Site Navigations
//
@@ -2027,25 +2028,19 @@ void TabContents::OnCrashedPlugin(const FilePath& plugin_path) {
DCHECK(!plugin_path.value().empty());
std::wstring plugin_name = plugin_path.ToWStringHack();
-#if defined(OS_WIN) || defined(OS_MACOSX)
- scoped_ptr<FileVersionInfo> version_info(
- FileVersionInfo::CreateFileVersionInfo(plugin_path));
- if (version_info.get()) {
- const std::wstring& product_name = version_info->product_name();
- if (!product_name.empty()) {
- plugin_name = product_name;
+ WebPluginInfo plugin_info;
+ if (NPAPI::PluginList::Singleton()->GetPluginInfoByPath(
+ plugin_path, &plugin_info) &&
+ !plugin_info.name.empty()) {
+ plugin_name = UTF16ToWide(plugin_info.name);
#if defined(OS_MACOSX)
- // Many plugins on the Mac have .plugin in the actual name, which looks
- // terrible, so look for that and strip it off if present.
- const std::wstring plugin_extension(L".plugin");
- if (EndsWith(plugin_name, plugin_extension, true))
- plugin_name.erase(plugin_name.length() - plugin_extension.length());
+ // Many plugins on the Mac have .plugin in the actual name, which looks
+ // terrible, so look for that and strip it off if present.
+ const std::wstring plugin_extension(L".plugin");
+ if (EndsWith(plugin_name, plugin_extension, true))
+ plugin_name.erase(plugin_name.length() - plugin_extension.length());
#endif // OS_MACOSX
- }
}
-#else
- NOTIMPLEMENTED() << " convert plugin path to plugin name";
-#endif
SkBitmap* crash_icon = ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_INFOBAR_PLUGIN_CRASHED);
AddInfoBar(new SimpleAlertInfoBarDelegate(