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: 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 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 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 render_frame->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin( 815 // Check to see if old infobar should be displayed.
815 render_frame->GetRoutingID(), 816 std::string trial_group =
816 group_name, 817 base::FieldTrialList::FindFullName("UnauthorizedPluginInfoBar");
817 identifier)); 818 if (plugin.type != content::WebPluginInfo::PLUGIN_TYPE_NPAPI ||
819 trial_group == "Enabled") {
820 render_frame->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin(
821 render_frame->GetRoutingID(),
822 group_name,
823 identifier));
824 }
818 break; 825 break;
819 } 826 }
820 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: { 827 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: {
821 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( 828 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
822 render_frame, 829 render_frame,
823 frame, 830 frame,
824 params, 831 params,
825 plugin, 832 plugin,
826 identifier, 833 identifier,
827 group_name, 834 group_name,
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1465 CommandLine* command_line = CommandLine::ForCurrentProcess();
1459 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); 1466 return !command_line->HasSwitch(extensions::switches::kExtensionProcess);
1460 } 1467 }
1461 1468
1462 blink::WebWorkerPermissionClientProxy* 1469 blink::WebWorkerPermissionClientProxy*
1463 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( 1470 ChromeContentRendererClient::CreateWorkerPermissionClientProxy(
1464 content::RenderFrame* render_frame, 1471 content::RenderFrame* render_frame,
1465 blink::WebFrame* frame) { 1472 blink::WebFrame* frame) {
1466 return new WorkerPermissionClientProxy(render_frame, frame); 1473 return new WorkerPermissionClientProxy(render_frame, frame);
1467 } 1474 }
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