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

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: Remove unnecessary comment 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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( 798 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
798 render_frame, 799 render_frame,
799 frame, 800 frame,
800 params, 801 params,
801 plugin, 802 plugin,
802 identifier, 803 identifier,
803 group_name, 804 group_name,
804 IDR_BLOCKED_PLUGIN_HTML, 805 IDR_BLOCKED_PLUGIN_HTML,
805 l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, group_name)); 806 l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, group_name));
806 placeholder->set_allow_loading(true); 807 placeholder->set_allow_loading(true);
807 render_frame->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin( 808 // Check to see if old infobar should be displayed.
808 render_frame->GetRoutingID(), 809 const std::string trial_group =
Bernhard Bauer 2014/06/09 17:03:18 Nit: We don't usually use const on local variables
809 group_name, 810 base::FieldTrialList::FindFullName("UnauthorizedPluginInfoBar");
810 identifier)); 811 if (plugin.type != content::WebPluginInfo::PLUGIN_TYPE_NPAPI ||
Bernhard Bauer 2014/06/09 17:03:18 Why are you doing this in the renderer instead of
812 trial_group == "Enabled") {
813 render_frame->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin(
814 render_frame->GetRoutingID(),
815 group_name,
816 identifier));
817 }
811 break; 818 break;
812 } 819 }
813 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: { 820 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: {
814 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( 821 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
815 render_frame, 822 render_frame,
816 frame, 823 frame,
817 params, 824 params,
818 plugin, 825 plugin,
819 identifier, 826 identifier,
820 group_name, 827 group_name,
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1458 CommandLine* command_line = CommandLine::ForCurrentProcess();
1452 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); 1459 return !command_line->HasSwitch(extensions::switches::kExtensionProcess);
1453 } 1460 }
1454 1461
1455 blink::WebWorkerPermissionClientProxy* 1462 blink::WebWorkerPermissionClientProxy*
1456 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( 1463 ChromeContentRendererClient::CreateWorkerPermissionClientProxy(
1457 content::RenderFrame* render_frame, 1464 content::RenderFrame* render_frame,
1458 blink::WebFrame* frame) { 1465 blink::WebFrame* frame) {
1459 return new WorkerPermissionClientProxy(render_frame, frame); 1466 return new WorkerPermissionClientProxy(render_frame, frame);
1460 } 1467 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698