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

Unified Diff: chrome/browser/renderer_host/plugin_info_message_filter.cc

Issue 10956065: Handle crashing Pepper plug-ins the same as crashing NPAPI plug-ins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/ppapi_plugin_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/plugin_info_message_filter.cc
===================================================================
--- chrome/browser/renderer_host/plugin_info_message_filter.cc (revision 157932)
+++ chrome/browser/renderer_host/plugin_info_message_filter.cc (working copy)
@@ -186,9 +186,8 @@
}
// Check if the plug-in requires authorization.
- if ((plugin_status ==
- PluginInstaller::SECURITY_STATUS_REQUIRES_AUTHORIZATION ||
- PluginService::GetInstance()->IsPluginUnstable(plugin.path)) &&
+ if (plugin_status ==
+ PluginInstaller::SECURITY_STATUS_REQUIRES_AUTHORIZATION &&
plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS &&
plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS &&
!always_authorize_plugins_.GetValue() &&
@@ -197,6 +196,15 @@
status->value = ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized;
return;
}
+
+ // Check if the plug-in is crashing too much.
+ if (PluginService::GetInstance()->IsPluginUnstable(plugin.path) &&
+ !always_authorize_plugins_.GetValue() &&
+ plugin_setting != CONTENT_SETTING_BLOCK &&
+ uses_default_content_setting) {
+ status->value = ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized;
+ return;
+ }
#endif
if (plugin_setting == CONTENT_SETTING_ASK)
« no previous file with comments | « no previous file | content/browser/ppapi_plugin_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698