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

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

Issue 134233002: Disable the Run option in context menu for blocked plugins if they were blocked by policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/render_messages.h ('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/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 plugin, 788 plugin,
789 identifier, 789 identifier,
790 group_name, 790 group_name,
791 IDR_BLOCKED_PLUGIN_HTML, 791 IDR_BLOCKED_PLUGIN_HTML,
792 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); 792 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
793 placeholder->set_allow_loading(true); 793 placeholder->set_allow_loading(true);
794 RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); 794 RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
795 observer->DidBlockContentType(content_type); 795 observer->DidBlockContentType(content_type);
796 break; 796 break;
797 } 797 }
798 case ChromeViewHostMsg_GetPluginInfo_Status::kBlockedByPolicy: {
799 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
800 render_frame,
801 frame,
802 params,
803 plugin,
804 identifier,
805 group_name,
806 IDR_BLOCKED_PLUGIN_HTML,
807 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
808 placeholder->set_allow_loading(false);
809 RenderThread::Get()->RecordAction(
810 UserMetricsAction("Plugin_BlockedByPolicy"));
811 observer->DidBlockContentType(content_type);
812 break;
813 }
798 } 814 }
799 } 815 }
800 placeholder->SetStatus(status); 816 placeholder->SetStatus(status);
801 return placeholder->plugin(); 817 return placeholder->plugin();
802 } 818 }
803 819
804 // For NaCl content handling plugins, the NaCl manifest is stored in an 820 // For NaCl content handling plugins, the NaCl manifest is stored in an
805 // additonal 'nacl' param associated with the MIME type. 821 // additonal 'nacl' param associated with the MIME type.
806 // static 822 // static
807 GURL ChromeContentRendererClient::GetNaClContentHandlerURL( 823 GURL ChromeContentRendererClient::GetNaClContentHandlerURL(
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1400 CommandLine* command_line = CommandLine::ForCurrentProcess();
1385 return !command_line->HasSwitch(switches::kExtensionProcess); 1401 return !command_line->HasSwitch(switches::kExtensionProcess);
1386 } 1402 }
1387 1403
1388 blink::WebWorkerPermissionClientProxy* 1404 blink::WebWorkerPermissionClientProxy*
1389 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( 1405 ChromeContentRendererClient::CreateWorkerPermissionClientProxy(
1390 content::RenderFrame* render_frame, 1406 content::RenderFrame* render_frame,
1391 blink::WebFrame* frame) { 1407 blink::WebFrame* frame) {
1392 return new WorkerPermissionClientProxy(render_frame, frame); 1408 return new WorkerPermissionClientProxy(render_frame, frame);
1393 } 1409 }
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698