Chromium Code Reviews| Index: chrome/browser/plugins/plugin_info_message_filter.cc |
| diff --git a/chrome/browser/plugins/plugin_info_message_filter.cc b/chrome/browser/plugins/plugin_info_message_filter.cc |
| index caed15b3a900a9c1b7d07be32f9c35a7d18cd07b..50ca2d192ebb6427a8c397c4435975846075eff6 100644 |
| --- a/chrome/browser/plugins/plugin_info_message_filter.cc |
| +++ b/chrome/browser/plugins/plugin_info_message_filter.cc |
| @@ -55,19 +55,6 @@ using content::WebPluginInfo; |
| namespace { |
| -#if defined(OS_WIN) || defined(OS_MACOSX) |
| -// These are the mime-types of plugins which are known to have PPAPI versions. |
| -const char* kPepperPluginMimeTypes[] = { |
| - "application/pdf", |
| - "application/x-google-chrome-pdf", |
| - "application/x-nacl", |
| - "application/x-pnacl", |
| - "application/vnd.chromium.remoting-viewer", |
| - "application/x-shockwave-flash", |
| - "application/futuresplash", |
| -}; |
| -#endif |
| - |
| // For certain sandboxed Pepper plugins, use the JavaScript Content Settings. |
| bool ShouldUseJavaScriptSettingForPlugin(const WebPluginInfo& plugin) { |
| if (plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS && |
| @@ -343,18 +330,6 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus( |
| const WebPluginInfo& plugin, |
| const PluginMetadata* plugin_metadata, |
| ChromeViewHostMsg_GetPluginInfo_Status* status) const { |
| - if (plugin.type == WebPluginInfo::PLUGIN_TYPE_NPAPI) { |
| - CHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
| - // NPAPI plugins are not supported inside <webview> guests. |
| -#if defined(ENABLE_EXTENSIONS) |
| - if (extensions::WebViewRendererState::GetInstance()->IsGuest( |
| - render_process_id_)) { |
| - *status = ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported; |
| - return; |
| - } |
| -#endif |
| - } |
| - |
| ContentSetting plugin_setting = CONTENT_SETTING_DEFAULT; |
| bool uses_default_content_setting = true; |
| bool is_managed = false; |
| @@ -372,9 +347,9 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus( |
| DCHECK(plugin_setting != CONTENT_SETTING_DEFAULT); |
| DCHECK(plugin_setting != CONTENT_SETTING_ASK); |
| +#if defined(ENABLE_PLUGIN_INSTALLATION) |
| PluginMetadata::SecurityStatus plugin_status = |
| plugin_metadata->GetSecurityStatus(plugin); |
| -#if defined(ENABLE_PLUGIN_INSTALLATION) |
| // Check if the plugin is outdated. |
| if (plugin_status == PluginMetadata::SECURITY_STATUS_OUT_OF_DATE && |
| !allow_outdated_plugins_.GetValue()) { |
| @@ -386,28 +361,6 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus( |
| return; |
| } |
| #endif |
| - // Check if the plugin or its group is enabled by policy. |
|
sky
2016/04/05 16:45:29
Why is it safe to remove this block?
piman
2016/04/05 17:10:01
As I explained in a comment on an earlier PS, the
sky
2016/04/05 19:11:15
Sorry, I missed the comment.
|
| - PluginPrefs::PolicyStatus plugin_policy = |
| - plugin_prefs_->PolicyStatusForPlugin(plugin.name); |
| - PluginPrefs::PolicyStatus group_policy = |
| - plugin_prefs_->PolicyStatusForPlugin(plugin_metadata->name()); |
| - |
| - // Check if the plugin requires authorization. |
| - if (plugin_status == |
| - PluginMetadata::SECURITY_STATUS_REQUIRES_AUTHORIZATION && |
| - plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS && |
| - plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS && |
| - plugin.type != WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN && |
| - !always_authorize_plugins_.GetValue() && |
| - plugin_setting != CONTENT_SETTING_BLOCK && |
| - uses_default_content_setting && |
| - plugin_policy != PluginPrefs::POLICY_ENABLED && |
| - group_policy != PluginPrefs::POLICY_ENABLED && |
| - !ChromePluginServiceFilter::GetInstance()->IsPluginRestricted( |
| - plugin.path)) { |
| - *status = ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized; |
| - return; |
| - } |
| // Check if the plugin is crashing too much. |
| if (PluginService::GetInstance()->IsPluginUnstable(plugin.path) && |
| @@ -475,19 +428,6 @@ bool PluginInfoMessageFilter::Context::FindEnabledPlugin( |
| url, mime_type, allow_wildcard, &matching_plugins, &mime_types); |
| if (matching_plugins.empty()) { |
| *status = ChromeViewHostMsg_GetPluginInfo_Status::kNotFound; |
| -#if defined(OS_WIN) || defined(OS_MACOSX) |
| - if (!PluginService::GetInstance()->NPAPIPluginsSupported()) { |
| - // At this point it is not known for sure this is an NPAPI plugin as it |
| - // could be a not-yet-installed Pepper plugin. To avoid notifying on |
| - // these types, bail early based on a blacklist of pepper mime types. |
| - for (auto pepper_mime_type : kPepperPluginMimeTypes) |
| - if (pepper_mime_type == mime_type) |
| - return false; |
| - |
| - ChromePluginServiceFilter::GetInstance()->NPAPIPluginNotFound( |
| - render_process_id_, render_frame_id, mime_type); |
| - } |
| -#endif |
| return false; |
| } |