Remove a bunch of easy entries from chrome\browser\DEPS.
-hide PluginProcessHost from chrome by having extensions code just tell PluginService which plugin to kill
-hide RenderProcessHostImpl from a test by using the interface instead
-use TestBrowserThread in the SyncListenNotifications tool instead of BrowserThreadImp
-remove some unnecessary mocks from chrome\browser\DEPS
BUG=98716
Review URL: https://chromiumcodereview.appspot.com/9159059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119906 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 6fe5f1eb..84397982 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -92,7 +92,6 @@
#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/plugin_process_host.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/devtools_agent_host_registry.h"
#include "content/public/browser/devtools_manager.h"
@@ -145,13 +144,6 @@
const char* kNaClPluginMimeType = "application/x-nacl";
-static void ForceShutdownPlugin(const FilePath& plugin_path) {
- PluginProcessHost* plugin =
- PluginService::GetInstance()->FindNpapiPluginProcess(plugin_path);
- if (plugin)
- plugin->ForceShutdown();
-}
-
static bool IsSyncableExtension(const Extension& extension) {
return extension.GetSyncType() == Extension::SYNC_TYPE_EXTENSION;
}
@@ -1158,9 +1150,7 @@
bool plugins_changed = false;
for (size_t i = 0; i < extension->plugins().size(); ++i) {
const Extension::PluginInfo& plugin = extension->plugins()[i];
- if (!BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
- base::Bind(&ForceShutdownPlugin, plugin.path)))
- NOTREACHED();
+ PluginService::GetInstance()->ForcePluginShutdown(plugin.path);
PluginService::GetInstance()->RefreshPlugins();
PluginService::GetInstance()->RemoveExtraPluginPath(plugin.path);
plugins_changed = true;