Disable system suspend while downloading files on win32.

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 <[email protected]>

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
8 files changed