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

Unified Diff: chrome/browser/pdf_unsupported_feature.cc

Issue 7387010: Add PluginServiceFilter interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit test Created 9 years, 4 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/extensions/extension_service.cc ('k') | chrome/browser/plugin_data_remover.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/pdf_unsupported_feature.cc
diff --git a/chrome/browser/pdf_unsupported_feature.cc b/chrome/browser/pdf_unsupported_feature.cc
index 3f5f6d00152621667c869fc518eba9f93c4b3200..1a91a39e0934104c806a4b9a13aa19c9d808474a 100644
--- a/chrome/browser/pdf_unsupported_feature.cc
+++ b/chrome/browser/pdf_unsupported_feature.cc
@@ -9,6 +9,7 @@
#include "base/version.h"
#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/browser/plugin_prefs.h"
+#include "chrome/browser/chrome_plugin_service_filter.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/chrome_interstitial_page.h"
@@ -140,19 +141,19 @@ void OpenUsingReader(TabContentsWrapper* tab,
const WebPluginInfo& reader_plugin,
InfoBarDelegate* old_delegate,
InfoBarDelegate* new_delegate) {
- PluginService::OverriddenPlugin plugin;
- plugin.render_process_id = tab->render_view_host()->process()->id();
- plugin.render_view_id = tab->render_view_host()->routing_id();
- plugin.url = tab->tab_contents()->GetURL();
- plugin.plugin = reader_plugin;
+ WebPluginInfo plugin = reader_plugin;
// The plugin is disabled, so enable it to get around the renderer check.
// Also give it a new version so that the renderer doesn't show the blocked
// plugin UI if it's vulnerable, since we already went through the
// interstitial.
- plugin.plugin.enabled = WebPluginInfo::USER_ENABLED;
- plugin.plugin.version = ASCIIToUTF16("11.0.0.0");
-
- PluginService::GetInstance()->OverridePluginForTab(plugin);
+ plugin.enabled = WebPluginInfo::USER_ENABLED;
+ plugin.version = ASCIIToUTF16("11.0.0.0");
+
+ ChromePluginServiceFilter::GetInstance()->OverridePluginForTab(
+ tab->render_view_host()->process()->id(),
+ tab->render_view_host()->routing_id(),
+ tab->tab_contents()->GetURL(),
+ plugin);
tab->render_view_host()->Send(new ViewMsg_ReloadFrame(
tab->render_view_host()->routing_id()));
@@ -386,8 +387,7 @@ void PDFHasUnsupportedFeature(TabContentsWrapper* tab) {
PluginGroup* reader_group = NULL;
std::vector<PluginGroup> plugin_groups;
- PluginList::Singleton()->GetPluginGroups(
- false, &plugin_groups);
+ PluginList::Singleton()->GetPluginGroups(false, &plugin_groups);
for (size_t i = 0; i < plugin_groups.size(); ++i) {
if (plugin_groups[i].GetGroupName() == reader_group_name) {
reader_group = &plugin_groups[i];
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/plugin_data_remover.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698