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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 300873002: Removed NPAPI plugin infobar, with Finch trial gate (disabled by default). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased to include new blocking page action UI Created 6 years, 6 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
« chrome/chrome_tests.gypi ('K') | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 1cef128b3b9bd1037aa9accf6a41d2cb2f0c136b..b4f26ca95bb4e583b927e892d46a44d7b6c297a6 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/debug/crash_logging.h"
#include "base/logging.h"
+#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/metrics/user_metrics_action.h"
#include "base/path_service.h"
@@ -810,12 +811,19 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
IDR_BLOCKED_PLUGIN_HTML,
l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, group_name));
placeholder->set_allow_loading(true);
- render_frame->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin(
- render_frame->GetRoutingID(),
- group_name,
- identifier));
- // Send IPC for showing content_setting_image/bubble.
- observer->DidBlockContentType(content_type);
+ // Check to see if old infobar should be displayed.
+ std::string trial_group =
+ base::FieldTrialList::FindFullName("UnauthorizedPluginInfoBar");
+ if (plugin.type != content::WebPluginInfo::PLUGIN_TYPE_NPAPI ||
+ trial_group == "Enabled") {
+ render_frame->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin(
+ render_frame->GetRoutingID(),
+ group_name,
+ identifier));
+ } else {
+ // Send IPC for showing blocked plugins page action.
+ observer->DidBlockContentType(content_type);
+ }
break;
}
case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: {
« chrome/chrome_tests.gypi ('K') | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698