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

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: Added back ASSERTs as EXPECTs for better test debug-ability. 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
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 d625a2583bd108389e51bac66c369dcf4d742868..83a56846d0bb011ab0978ae5587bdcf2380cf753 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"
@@ -804,10 +805,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
felt 2014/06/06 22:55:33 nit: we normally encourage people to use proper gr
Chris Thompson 2014/06/06 23:49:37 Fixed.
+ const 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: {

Powered by Google App Engine
This is Rietveld 408576698