diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 17:16:10 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 17:16:10 +0000 |
commit | 1b51720a8f40618cdc13fbb295e56ef9909a0c63 (patch) | |
tree | 136763299c1673989ff577333f0e43d3aab23d2b /webkit | |
parent | 166ccde782c9603bfda23edd922d467a47f08cef (diff) | |
download | chromium_src-1b51720a8f40618cdc13fbb295e56ef9909a0c63.zip chromium_src-1b51720a8f40618cdc13fbb295e56ef9909a0c63.tar.gz chromium_src-1b51720a8f40618cdc13fbb295e56ef9909a0c63.tar.bz2 |
Disable the failing linux aura browser tests so that it can be enabled on the bots. Most of the failing tests are related to task maanger and full screen.
I disabled the use of the plugin loader process for Aura builds, since it seems unnecessary (i.e. don't need to pay cost of extra process and complexity given that unstable NPAPI plugins aren't loaded).
BUG=163931
Review URL: https://codereview.chromium.org/11635006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173936 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/plugins/npapi/plugin_list.cc | 31 | ||||
-rw-r--r-- | webkit/plugins/npapi/plugin_utils.cc | 8 | ||||
-rw-r--r-- | webkit/plugins/npapi/plugin_utils.h | 2 |
3 files changed, 34 insertions, 7 deletions
diff --git a/webkit/plugins/npapi/plugin_list.cc b/webkit/plugins/npapi/plugin_list.cc index cd1584b..5bcc960 100644 --- a/webkit/plugins/npapi/plugin_list.cc +++ b/webkit/plugins/npapi/plugin_list.cc @@ -17,6 +17,7 @@ #include "net/base/mime_util.h" #include "webkit/glue/webkit_glue.h" #include "webkit/plugins/npapi/plugin_lib.h" +#include "webkit/plugins/npapi/plugin_utils.h" #include "webkit/plugins/plugin_switches.h" #if defined(OS_WIN) @@ -86,6 +87,13 @@ void PluginList::RefreshPlugins() { } void PluginList::AddExtraPluginPath(const FilePath& plugin_path) { + if (!NPAPIPluginsSupported()) { + // TODO(jam): remove and just have CHECK once we're sure this doesn't get + // triggered. + DLOG(INFO) << "NPAPI plugins not supported"; + return; + } + // Chrome OS only loads plugins from /opt/google/chrome/plugins. #if !defined(OS_CHROMEOS) base::AutoLock lock(lock_); @@ -120,6 +128,12 @@ void PluginList::RegisterInternalPluginWithEntryPoints( const webkit::WebPluginInfo& info, bool add_at_beginning, const PluginEntryPoints& entry_points) { + if (!NPAPIPluginsSupported() && + info.type == WebPluginInfo::PLUGIN_TYPE_NPAPI) { + DLOG(INFO) << "Don't register NPAPI plugins when they're not supported"; + return; + } + InternalPlugin plugin = { info, entry_points }; base::AutoLock lock(lock_); @@ -313,9 +327,6 @@ void PluginList::GetPluginPathsToLoad(std::vector<FilePath>* plugin_paths) { extra_plugin_dirs = extra_plugin_dirs_; } - std::vector<FilePath> directories_to_scan; - GetPluginDirectories(&directories_to_scan); - for (size_t i = 0; i < extra_plugin_paths.size(); ++i) { const FilePath& path = extra_plugin_paths[i]; if (std::find(plugin_paths->begin(), plugin_paths->end(), path) != @@ -325,15 +336,21 @@ void PluginList::GetPluginPathsToLoad(std::vector<FilePath>* plugin_paths) { plugin_paths->push_back(path); } - for (size_t i = 0; i < extra_plugin_dirs.size(); ++i) - GetPluginsInDir(extra_plugin_dirs[i], plugin_paths); + if (NPAPIPluginsSupported()) { + // A bit confusingly, this function is used to load Pepper plugins as well. + // Those are all internal plugins so we have to use extra_plugin_paths. + for (size_t i = 0; i < extra_plugin_dirs.size(); ++i) + GetPluginsInDir(extra_plugin_dirs[i], plugin_paths); - for (size_t i = 0; i < directories_to_scan.size(); ++i) - GetPluginsInDir(directories_to_scan[i], plugin_paths); + std::vector<FilePath> directories_to_scan; + GetPluginDirectories(&directories_to_scan); + for (size_t i = 0; i < directories_to_scan.size(); ++i) + GetPluginsInDir(directories_to_scan[i], plugin_paths); #if defined(OS_WIN) GetPluginPathsFromRegistry(plugin_paths); #endif + } } void PluginList::SetPlugins(const std::vector<webkit::WebPluginInfo>& plugins) { diff --git a/webkit/plugins/npapi/plugin_utils.cc b/webkit/plugins/npapi/plugin_utils.cc index 4cef347..aa882a3 100644 --- a/webkit/plugins/npapi/plugin_utils.cc +++ b/webkit/plugins/npapi/plugin_utils.cc @@ -44,5 +44,13 @@ void CreateVersionFromString(const string16& version_string, *parsed_version = Version(no_leading_zeros_version); } +bool NPAPIPluginsSupported() { +#if defined(OS_WIN) || defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(USE_AURA)) + return true; +#else + return false; +#endif +} + } // namespace npapi } // namespace webkit diff --git a/webkit/plugins/npapi/plugin_utils.h b/webkit/plugins/npapi/plugin_utils.h index 6745ef3..77e65e6 100644 --- a/webkit/plugins/npapi/plugin_utils.h +++ b/webkit/plugins/npapi/plugin_utils.h @@ -19,6 +19,8 @@ WEBKIT_PLUGINS_EXPORT void CreateVersionFromString( const string16& version_string, Version* parsed_version); +// Returns true iff NPAPI plugins are supported on the current platform. +WEBKIT_PLUGINS_EXPORT bool NPAPIPluginsSupported(); } // namespace npapi } // namespace webkit |