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

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: Updated to have dependent upstream CL, switched how field trials are set 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 31641fd9aa5cffcf2f698140534e1e1ab4092822..ee043f99c1ac2744ad5e5d2683227a923c72f3f4 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,12 +812,17 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
IDR_BLOCKED_PLUGIN_HTML,
l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, group_name));
placeholder->set_allow_loading(true);
- // Send IPC for showing infobar
- render_frame->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin(
- render_frame->GetRoutingID(),
- group_name,
- identifier));
- // Send IPC for showing content_setting_image/bubble
+ // 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));
+ }
+ // Send IPC for showing content_setting_bubble.
observer->DidBlockContentType(content_type);
break;
}
« chrome/browser/plugins/npapi_infobar_browsertest.cc ('K') | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698