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

Unified Diff: chrome/browser/renderer_host/plugin_info_message_filter.cc

Issue 11066043: Block NPAPI plug-ins in Metro mode instead of not loading them at all. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 2 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 | « chrome/browser/plugins/plugin_observer.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/plugin_info_message_filter.cc
diff --git a/chrome/browser/renderer_host/plugin_info_message_filter.cc b/chrome/browser/renderer_host/plugin_info_message_filter.cc
index 736469b6d4a78b61f8665568a50ee3c6513479da..3f3e32b3e8e8af64d0d60776cefac3a745c587e7 100644
--- a/chrome/browser/renderer_host/plugin_info_message_filter.cc
+++ b/chrome/browser/renderer_host/plugin_info_message_filter.cc
@@ -24,6 +24,10 @@
#include "googleurl/src/gurl.h"
#include "webkit/plugins/npapi/plugin_list.h"
+#if defined(OS_WIN)
+#include "base/win/metro.h"
+#endif
+
using content::PluginService;
using webkit::WebPluginInfo;
@@ -137,6 +141,15 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus(
const WebPluginInfo& plugin,
const PluginMetadata* plugin_metadata,
ChromeViewHostMsg_GetPluginInfo_Status* status) const {
+#if defined(OS_WIN)
+ if (plugin.type == WebPluginInfo::PLUGIN_TYPE_NPAPI &&
+ base::win::IsMetroProcess()) {
+ status->value =
+ ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported;
+ return;
+ }
+#endif
+
ContentSetting plugin_setting = CONTENT_SETTING_DEFAULT;
bool uses_default_content_setting = true;
// Check plug-in content settings. The primary URL is the top origin URL and
« no previous file with comments | « chrome/browser/plugins/plugin_observer.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698