diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-13 22:28:39 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-13 22:28:39 +0000 |
commit | 3c1e4d080a8e69fb973638d1360d4d5dd0d2e4d5 (patch) | |
tree | 6e0dd93050705d4f23cd0dbb98adce74ffd8f948 /chrome/browser | |
parent | fba16af6947aa34557889c62f5719d04ce9466db (diff) | |
download | chromium_src-3c1e4d080a8e69fb973638d1360d4d5dd0d2e4d5.zip chromium_src-3c1e4d080a8e69fb973638d1360d4d5dd0d2e4d5.tar.gz chromium_src-3c1e4d080a8e69fb973638d1360d4d5dd0d2e4d5.tar.bz2 |
Make plugin processes (except Gears) run at normal priority.
This fixes a lot of the spurious unresponsive plugin dialogs, and also makes it so that the browser process isn't hung waiting for a low priority plugin process when cpu usage is high.
I was able to simulate this by using 100% cpu in a test program. Before this change, the dialog always comes up and a flash video never plays. The browser process is also hung. With this change the video plays and I can interact with the browser.
Review URL: http://codereview.chromium.org/7129
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3323 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/plugin_process_host.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index b3db5f1..f039d07 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -440,8 +440,12 @@ bool PluginProcessHost::Init(const std::wstring& dll, watcher_.StartWatching(process_.handle(), this); - // Give all plugins "background" priority. See http://b/issue?id=1280317. - process_.SetProcessBackgrounded(true); + std::wstring gears_path; + if (PathService::Get(chrome::FILE_GEARS_PLUGIN, &gears_path) && + dll == gears_path) { + // Give Gears plugins "background" priority. See http://b/issue?id=1280317. + process_.SetProcessBackgrounded(true); + } opening_channel_ = true; |