diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-29 08:21:28 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-29 08:21:28 +0000 |
commit | 685980787980c7be0dd1f8b83900718c8e2634f2 (patch) | |
tree | 8d5e3d52426658543f7ac025f9cb44afd0b9c531 /webkit/support/webkit_support_glue.cc | |
parent | 02601778c9535f4b23c084794204d6ee2bd0fa86 (diff) | |
download | chromium_src-685980787980c7be0dd1f8b83900718c8e2634f2.zip chromium_src-685980787980c7be0dd1f8b83900718c8e2634f2.tar.gz chromium_src-685980787980c7be0dd1f8b83900718c8e2634f2.tar.bz2 |
PluginList cleanup to fix a race condition and decrease the API surface for future refactorings:
* Remove "webkit/glue/plugins/plugin_list.h" includes in favor of "webkit/npapi/plugins/plugin_list.h"
* Remove |refresh| parameter from |GetPlugins| in favor of calling |RefreshPlugins| beforehand.
* Remove |GetPluginInfo| in favor of calling |GetPluginInfoArray| and looking for the first enabled plug-in.
* Remove |GetEnabledPlugins| in favor of calling |GetPlugins| and filtering out disabled plugins.
* Remove |stale| in favor of an outparameter to |GetPluginInfoArray|, to remove the race condition.
BUG=69516,80794
TEST=none
Review URL: http://codereview.chromium.org/7497030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94641 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support/webkit_support_glue.cc')
-rw-r--r-- | webkit/support/webkit_support_glue.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/webkit/support/webkit_support_glue.cc b/webkit/support/webkit_support_glue.cc index 02a2233..ef67877 100644 --- a/webkit/support/webkit_support_glue.cc +++ b/webkit/support/webkit_support_glue.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -16,7 +16,9 @@ namespace webkit_glue { void GetPlugins(bool refresh, std::vector<webkit::npapi::WebPluginInfo>* plugins) { - webkit::npapi::PluginList::Singleton()->GetPlugins(refresh, plugins); + if (refresh) + webkit::npapi::PluginList::Singleton()->RefreshPlugins(); + webkit::npapi::PluginList::Singleton()->GetPlugins(plugins); // Don't load the forked npapi_layout_test_plugin in DRT, we only want to // use the upstream version TestNetscapePlugIn. const FilePath::StringType kPluginBlackList[] = { |