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

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: Move tests out of renderer, address various reviewer comments 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 75384ebdad23425078d5336105f0ddc0d1da57be..191b4bfd9df71dd1d02693d635654392794a5ee8 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"
@@ -811,10 +812,16 @@ 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));
+ // 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));
+ }
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