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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
11 #include "base/metrics/user_metrics_action.h" 12 #include "base/metrics/user_metrics_action.h"
12 #include "base/path_service.h" 13 #include "base/path_service.h"
13 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
15 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
16 #include "base/values.h" 17 #include "base/values.h"
17 #include "chrome/common/chrome_content_client.h" 18 #include "chrome/common/chrome_content_client.h"
18 #include "chrome/common/chrome_paths.h" 19 #include "chrome/common/chrome_paths.h"
19 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( 805 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
805 render_frame, 806 render_frame,
806 frame, 807 frame,
807 params, 808 params,
808 plugin, 809 plugin,
809 identifier, 810 identifier,
810 group_name, 811 group_name,
811 IDR_BLOCKED_PLUGIN_HTML, 812 IDR_BLOCKED_PLUGIN_HTML,
812 l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, group_name)); 813 l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, group_name));
813 placeholder->set_allow_loading(true); 814 placeholder->set_allow_loading(true);
814 // Send IPC for showing infobar 815 // Check to see if old infobar should be displayed.
815 render_frame->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin( 816 std::string trial_group =
816 render_frame->GetRoutingID(), 817 base::FieldTrialList::FindFullName("UnauthorizedPluginInfoBar");
817 group_name, 818 if (plugin.type != content::WebPluginInfo::PLUGIN_TYPE_NPAPI ||
818 identifier)); 819 trial_group == "Enabled") {
819 // Send IPC for showing content_setting_image/bubble 820 render_frame->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin(
821 render_frame->GetRoutingID(),
822 group_name,
823 identifier));
824 }
825 // Send IPC for showing content_setting_bubble.
820 observer->DidBlockContentType(content_type); 826 observer->DidBlockContentType(content_type);
821 break; 827 break;
822 } 828 }
823 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: { 829 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: {
824 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( 830 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
825 render_frame, 831 render_frame,
826 frame, 832 frame,
827 params, 833 params,
828 plugin, 834 plugin,
829 identifier, 835 identifier,
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1467 CommandLine* command_line = CommandLine::ForCurrentProcess();
1462 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); 1468 return !command_line->HasSwitch(extensions::switches::kExtensionProcess);
1463 } 1469 }
1464 1470
1465 blink::WebWorkerPermissionClientProxy* 1471 blink::WebWorkerPermissionClientProxy*
1466 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( 1472 ChromeContentRendererClient::CreateWorkerPermissionClientProxy(
1467 content::RenderFrame* render_frame, 1473 content::RenderFrame* render_frame,
1468 blink::WebFrame* frame) { 1474 blink::WebFrame* frame) {
1469 return new WorkerPermissionClientProxy(render_frame, frame); 1475 return new WorkerPermissionClientProxy(render_frame, frame);
1470 } 1476 }
OLDNEW
« 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