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

Unified Diff: chrome/browser/plugins/plugin_infobar_delegates.cc

Issue 12086077: Only permit plug-in loads in the browser if the plug-in isn't blocked or the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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: chrome/browser/plugins/plugin_infobar_delegates.cc
===================================================================
--- chrome/browser/plugins/plugin_infobar_delegates.cc (revision 180039)
+++ chrome/browser/plugins/plugin_infobar_delegates.cc (working copy)
@@ -9,10 +9,12 @@
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/lifetime/application_lifetime.h"
+#include "chrome/browser/plugins/chrome_plugin_service_filter.h"
#include "chrome/browser/plugins/plugin_metadata.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
@@ -62,8 +64,11 @@
void PluginInfoBarDelegate::LoadBlockedPlugins() {
content::WebContents* web_contents = owner()->GetWebContents();
if (web_contents) {
- web_contents->Send(new ChromeViewMsg_LoadBlockedPlugins(
- web_contents->GetRoutingID(), identifier_));
+ content::RenderViewHost* host = web_contents->GetRenderViewHost();
+ ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins(
+ host->GetProcess()->GetID());
+ host->Send(new ChromeViewMsg_LoadBlockedPlugins(
+ host->GetRoutingID(), identifier_));
}
}

Powered by Google App Engine
This is Rietveld 408576698