summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-30 19:47:12 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-30 19:47:12 +0000
commit1cc76f5295c82e141a76b139ad8e0e0019ac8c40 (patch)
treeff2e8a7eadd503bbf54ff088cd98129d415f0703 /chrome
parent23b7ec676e36ff858b11997bb70d262b315c5010 (diff)
downloadchromium_src-1cc76f5295c82e141a76b139ad8e0e0019ac8c40.zip
chromium_src-1cc76f5295c82e141a76b139ad8e0e0019ac8c40.tar.gz
chromium_src-1cc76f5295c82e141a76b139ad8e0e0019ac8c40.tar.bz2
Disable checking group policy for plugins on startup since we shouldn't load the plugins on the UI/IO thread. Add a way for PluginList to indirectly ensure it doesn't load the plugins on the wrong thread.
BUG=57425 Review URL: http://codereview.chromium.org/3599004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61096 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/plugin_service.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc
index c1d7e02..bfbc3fe 100644
--- a/chrome/browser/plugin_service.cc
+++ b/chrome/browser/plugin_service.cc
@@ -56,12 +56,24 @@ static void NotifyPluginsOfActivation() {
// static
bool PluginService::enable_chrome_plugins_ = true;
+void LoadPluginsFromDiskHook() {
+ DCHECK(!ChromeThread::CurrentlyOn(ChromeThread::UI) &&
+ !ChromeThread::CurrentlyOn(ChromeThread::IO)) <<
+ "Can't load plugins on the IO/UI threads since it's very slow.";
+}
+
// static
void PluginService::InitGlobalInstance(Profile* profile) {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ NPAPI::PluginList::Singleton()->SetPluginLoadHook(LoadPluginsFromDiskHook);
+
+ /*
+ Code is disabled since plugins shouldn't be loaded on the UI/IO threads.
+ See http://code.google.com/p/chromium/issues/detail?id=57425
// We first group the plugins and then figure out which groups to disable.
PluginUpdater::GetPluginUpdater()->DisablePluginGroupsFromPrefs(profile);
+ */
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableOutdatedPlugins)) {