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

Unified Diff: chrome/renderer/render_view.cc

Issue 6350010: Put some plug-ins behind an infobar, where they have:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | « chrome/common/chrome_switches.cc ('k') | webkit/plugins/npapi/plugin_group.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 72559)
+++ chrome/renderer/render_view.cc (working copy)
@@ -2725,6 +2725,26 @@
ContentSetting host_setting =
current_content_settings_.settings[CONTENT_SETTINGS_TYPE_PLUGINS];
+
+ if (group->RequiresAuthorization() &&
+ !cmd->HasSwitch(switches::kAlwaysAuthorizePlugins) &&
+ (plugin_setting == CONTENT_SETTING_ALLOW ||
+ plugin_setting == CONTENT_SETTING_ASK) &&
+ host_setting == CONTENT_SETTING_DEFAULT) {
+ // TODO(cevans) - may need some form of "always allow this web site",
+ // either via an explicit button or integration with the blocked-plugin
+ // bubble.
Bernhard Bauer 2011/01/26 12:49:25 Nit: Comment unnecessary?
+ Send(new ViewHostMsg_BlockedOutdatedPlugin(routing_id_,
+ group->GetGroupName(),
+ GURL()));
+ return CreatePluginPlaceholder(frame,
+ params,
+ *group,
+ IDR_BLOCKED_PLUGIN_HTML,
+ IDS_PLUGIN_NOT_AUTHORIZED,
+ false);
+ }
+
if (info.path.value() == webkit::npapi::kDefaultPluginLibraryName ||
plugin_setting == CONTENT_SETTING_ALLOW ||
host_setting == CONTENT_SETTING_ALLOW) {
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | webkit/plugins/npapi/plugin_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698