diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-21 08:43:39 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-21 08:43:39 +0000 |
commit | 51549da314ab40bfce645bb6c5875c4e5ec12f67 (patch) | |
tree | 3e559616fcd7e3e21b694dcf6ed57794a85c6f0d /chrome/browser/plugin_service.cc | |
parent | 4d409d77dfaa84a06547d3e0a45191cf803fbb9d (diff) | |
download | chromium_src-51549da314ab40bfce645bb6c5875c4e5ec12f67.zip chromium_src-51549da314ab40bfce645bb6c5875c4e5ec12f67.tar.gz chromium_src-51549da314ab40bfce645bb6c5875c4e5ec12f67.tar.bz2 |
Tommi, please review everything. John please review the changes to plugin_service.cc/.h
The test automation provider registers itself as a protocol factory for http/https requests. This
is to ensure that intercepts set by the url request network tests work correctly. I was seeing these
tests fail consistently on my setup as their intercept function would never get called.
The other change is to add a simple mechanism based on a boolean flag to disable browser side plugins
like gears which also intercept network requests and expect to be called on the IO thread. The chrome
frame network tests run in a relatively simple environment where the network tests run in a separate thread
(not the IO thread) which causes a number of DCHECKS to fire in debug build test runs. The flag used to
determine whether browser plugins are loaded defaults to true.
Review URL: http://codereview.chromium.org/414017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_service.cc')
-rw-r--r-- | chrome/browser/plugin_service.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc index 5f66be9..ba5821e 100644 --- a/chrome/browser/plugin_service.cc +++ b/chrome/browser/plugin_service.cc @@ -42,10 +42,18 @@ static void NotifyPluginsOfActivation() { #endif // static +bool PluginService::enable_chrome_plugins_ = true; + +// static PluginService* PluginService::GetInstance() { return Singleton<PluginService>::get(); } +// static +void PluginService::EnableChromePlugins(bool enable) { + enable_chrome_plugins_ = enable; +} + PluginService::PluginService() : main_message_loop_(MessageLoop::current()), resource_dispatcher_host_(NULL), @@ -103,6 +111,9 @@ PluginService::~PluginService() { void PluginService::LoadChromePlugins( ResourceDispatcherHost* resource_dispatcher_host) { + if (!enable_chrome_plugins_) + return; + resource_dispatcher_host_ = resource_dispatcher_host; ChromePluginLib::LoadChromePlugins(GetCPBrowserFuncsForBrowser()); } |