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

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: 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 unified diff | Download patch
« chrome/chrome_tests.gypi ('K') | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( 804 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
804 render_frame, 805 render_frame,
805 frame, 806 frame,
806 params, 807 params,
807 plugin, 808 plugin,
808 identifier, 809 identifier,
809 group_name, 810 group_name,
810 IDR_BLOCKED_PLUGIN_HTML, 811 IDR_BLOCKED_PLUGIN_HTML,
811 l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, group_name)); 812 l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, group_name));
812 placeholder->set_allow_loading(true); 813 placeholder->set_allow_loading(true);
813 render_frame->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin( 814 // Check to see if old infobar should be displayed.
814 render_frame->GetRoutingID(), 815 std::string trial_group =
815 group_name, 816 base::FieldTrialList::FindFullName("UnauthorizedPluginInfoBar");
816 identifier)); 817 if (plugin.type != content::WebPluginInfo::PLUGIN_TYPE_NPAPI ||
817 // Send IPC for showing content_setting_image/bubble. 818 trial_group == "Enabled") {
818 observer->DidBlockContentType(content_type); 819 render_frame->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin(
820 render_frame->GetRoutingID(),
821 group_name,
822 identifier));
823 } else {
824 // Send IPC for showing blocked plugins page action.
825 observer->DidBlockContentType(content_type);
826 }
819 break; 827 break;
820 } 828 }
821 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: { 829 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: {
822 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( 830 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
823 render_frame, 831 render_frame,
824 frame, 832 frame,
825 params, 833 params,
826 plugin, 834 plugin,
827 identifier, 835 identifier,
828 group_name, 836 group_name,
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1426 CommandLine* command_line = CommandLine::ForCurrentProcess();
1419 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); 1427 return !command_line->HasSwitch(extensions::switches::kExtensionProcess);
1420 } 1428 }
1421 1429
1422 blink::WebWorkerPermissionClientProxy* 1430 blink::WebWorkerPermissionClientProxy*
1423 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( 1431 ChromeContentRendererClient::CreateWorkerPermissionClientProxy(
1424 content::RenderFrame* render_frame, 1432 content::RenderFrame* render_frame,
1425 blink::WebFrame* frame) { 1433 blink::WebFrame* frame) {
1426 return new WorkerPermissionClientProxy(render_frame, frame); 1434 return new WorkerPermissionClientProxy(render_frame, frame);
1427 } 1435 }
OLDNEW
« 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