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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 801053003: Never display unauthorized plugin info bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove a header file Created 6 years 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | tools/metrics/actions/actions.xml » ('j') | 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/field_trial.h"
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name), 859 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name),
860 GURL()); 860 GURL());
861 break; 861 break;
862 } 862 }
863 case ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized: { 863 case ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized: {
864 placeholder = create_blocked_plugin( 864 placeholder = create_blocked_plugin(
865 IDR_BLOCKED_PLUGIN_HTML, 865 IDR_BLOCKED_PLUGIN_HTML,
866 l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, group_name), 866 l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, group_name),
867 GURL()); 867 GURL());
868 placeholder->set_allow_loading(true); 868 placeholder->set_allow_loading(true);
869 // Check to see if old infobar should be displayed. 869 if (plugin.type != content::WebPluginInfo::PLUGIN_TYPE_NPAPI) {
870 std::string trial_group =
871 base::FieldTrialList::FindFullName("UnauthorizedPluginInfoBar");
872 if (plugin.type != content::WebPluginInfo::PLUGIN_TYPE_NPAPI ||
873 trial_group == "Enabled") {
874 render_frame->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin( 870 render_frame->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin(
875 render_frame->GetRoutingID(), 871 render_frame->GetRoutingID(),
876 group_name, 872 group_name,
877 identifier)); 873 identifier));
878 } else {
879 // Send IPC for showing blocked plugins page action.
880 observer->DidBlockContentType(content_type, group_name);
881 } 874 }
875 observer->DidBlockContentType(content_type, group_name);
882 break; 876 break;
883 } 877 }
884 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: { 878 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: {
885 placeholder = create_blocked_plugin( 879 placeholder = create_blocked_plugin(
886 IDR_CLICK_TO_PLAY_PLUGIN_HTML, 880 IDR_CLICK_TO_PLAY_PLUGIN_HTML,
887 l10n_util::GetStringFUTF16(IDS_PLUGIN_LOAD, group_name), GURL()); 881 l10n_util::GetStringFUTF16(IDS_PLUGIN_LOAD, group_name), GURL());
888 placeholder->set_allow_loading(true); 882 placeholder->set_allow_loading(true);
889 RenderThread::Get()->RecordAction( 883 RenderThread::Get()->RecordAction(
890 UserMetricsAction("Plugin_ClickToPlay")); 884 UserMetricsAction("Plugin_ClickToPlay"));
891 observer->DidBlockContentType(content_type, group_name); 885 observer->DidBlockContentType(content_type, group_name);
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 if (mime_type == content::kBrowserPluginMimeType) { 1564 if (mime_type == content::kBrowserPluginMimeType) {
1571 return new extensions::ExtensionsGuestViewContainer(render_frame); 1565 return new extensions::ExtensionsGuestViewContainer(render_frame);
1572 } else { 1566 } else {
1573 return new extensions::MimeHandlerViewContainer( 1567 return new extensions::MimeHandlerViewContainer(
1574 render_frame, mime_type, original_url); 1568 render_frame, mime_type, original_url);
1575 } 1569 }
1576 #else 1570 #else
1577 return NULL; 1571 return NULL;
1578 #endif 1572 #endif
1579 } 1573 }
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698