Sequentialize calls to PluginList::GetPlugins from PluginService.
BUG=105987
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=137396
Review URL: https://chromiumcodereview.appspot.com/10381087
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137421 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/plugin_service_impl.h b/content/browser/plugin_service_impl.h
index bc8f112..b3fcbf9 100644
--- a/content/browser/plugin_service_impl.h
+++ b/content/browser/plugin_service_impl.h
@@ -18,6 +18,7 @@
#include "base/memory/scoped_vector.h"
#include "base/memory/singleton.h"
#include "base/synchronization/waitable_event_watcher.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "base/time.h"
#include "build/build_config.h"
#include "content/browser/plugin_process_host.h"
@@ -177,9 +178,11 @@
void RegisterPepperPlugins();
- // Function that is run on the FILE thread to load the plugins synchronously.
+#if defined(OS_WIN)
+ // Run on the blocking pool to load the plugins synchronously.
void GetPluginsInternal(base::MessageLoopProxy* target_loop,
const GetPluginsCallback& callback);
+#endif
// Binding directly to GetAllowedPluginForOpenChannelToPlugin() isn't possible
// because more arity is needed <http://crbug.com/98542>. This just forwards.
@@ -240,6 +243,10 @@
std::set<PluginProcessHost::Client*> pending_plugin_clients_;
+#if defined(OS_WIN)
+ // Used to sequentialize loading plug-ins from disk.
+ base::SequencedWorkerPool::SequenceToken plugin_list_token_;
+#endif
#if defined(OS_POSIX)
scoped_refptr<PluginLoaderPosix> plugin_loader_;
#endif