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

Unified Diff: chrome/browser/extensions/plugin_manager.cc

Issue 1862513003: Remove NPAPI from browser and utility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
Index: chrome/browser/extensions/plugin_manager.cc
diff --git a/chrome/browser/extensions/plugin_manager.cc b/chrome/browser/extensions/plugin_manager.cc
index e86fcb807d07239668a4a4361bb1edfd7f4dc92f..57cd72a409cd40b8953d29cf1112e8fb381b584e 100644
--- a/chrome/browser/extensions/plugin_manager.cc
+++ b/chrome/browser/extensions/plugin_manager.cc
@@ -48,27 +48,6 @@ PluginManager::GetFactoryInstance() {
void PluginManager::OnExtensionLoaded(content::BrowserContext* browser_context,
const Extension* extension) {
bool plugins_or_nacl_changed = false;
- if (PluginInfo::HasPlugins(extension)) {
- const PluginInfo::PluginVector* plugins = PluginInfo::GetPlugins(extension);
- CHECK(plugins);
- plugins_or_nacl_changed = true;
- for (PluginInfo::PluginVector::const_iterator plugin = plugins->begin();
- plugin != plugins->end();
- ++plugin) {
- PluginService::GetInstance()->RefreshPlugins();
- PluginService::GetInstance()->AddExtraPluginPath(plugin->path);
- ChromePluginServiceFilter* filter =
- ChromePluginServiceFilter::GetInstance();
- if (plugin->is_public) {
- filter->RestrictPluginToProfileAndOrigin(
- plugin->path, profile_, GURL());
- } else {
- filter->RestrictPluginToProfileAndOrigin(
- plugin->path, profile_, extension->url());
- }
- }
- }
-
#if !defined(DISABLE_NACL)
const NaClModuleInfo::List* nacl_modules =
NaClModuleInfo::GetNaClModules(extension);
@@ -118,19 +97,6 @@ void PluginManager::OnExtensionUnloaded(
const Extension* extension,
UnloadedExtensionInfo::Reason reason) {
bool plugins_or_nacl_changed = false;
- if (PluginInfo::HasPlugins(extension)) {
- const PluginInfo::PluginVector* plugins = PluginInfo::GetPlugins(extension);
- plugins_or_nacl_changed = true;
- for (PluginInfo::PluginVector::const_iterator plugin = plugins->begin();
- plugin != plugins->end();
- ++plugin) {
- PluginService::GetInstance()->ForcePluginShutdown(plugin->path);
- PluginService::GetInstance()->RefreshPlugins();
- PluginService::GetInstance()->RemoveExtraPluginPath(plugin->path);
- ChromePluginServiceFilter::GetInstance()->UnrestrictPlugin(plugin->path);
- }
- }
-
#if !defined(DISABLE_NACL)
const NaClModuleInfo::List* nacl_modules =
NaClModuleInfo::GetNaClModules(extension);
@@ -150,7 +116,6 @@ void PluginManager::OnExtensionUnloaded(
plugins_or_nacl_changed = true;
base::FilePath path = handler->GetPluginPath();
PluginService::GetInstance()->UnregisterInternalPlugin(path);
- PluginService::GetInstance()->ForcePluginShutdown(path);
PluginService::GetInstance()->RefreshPlugins();
}

Powered by Google App Engine
This is Rietveld 408576698