summaryrefslogtreecommitdiffstats
path: root/chrome/browser/power_save_blocker_common.cc
Commit message (Collapse)AuthorAgeFilesLines
* Simplify threading in browser thread by making only ChromeThread deal with ↵jam@chromium.org2009-10-271-3/+2
| | | | | | | | different thread lifetimes.The rest of the code doesn't get MessageLoop pointers since they're not thread-safe and instead just call PostTask on ChromeThread. If the target thread is not alive, then the task is simply deleted.In a followup change, I'll remove any remaining MessageLoop* caching. With this change, there's little to be gained by caching since no locks are involved if the target MessageLoop is guaranteed to outlive the current thread (inferred automatically by the order of the chrome_threads_ array).BUG=25354 Review URL: http://codereview.chromium.org/306032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30163 0039d316-1c4b-4281-b951-d872f2087c98
* Disable system suspend while downloading files on win32.mark@chromium.org2009-10-231-0/+58
If the system goes into power-save sleep mode while downloading files, the download fails. So, prevent sleep mode until the download finishes. This patch introduces a new RAII class to request that the system's power-save mode be disabled - PowerSaveBlocker. This is only implemented for win32; other platforms are stubbed out. This only partially implements bug 25420 it only attempts to handle the downloading case. Patch by Bryan Donlan <bdonlan@gmail.com> BUG=25420 TEST=Download a large file with the system sleep timeout set to a short interval. Review URL: http://codereview.chromium.org/287017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29873 0039d316-1c4b-4281-b951-d872f2087c98