Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Issue 287017: Disable system suspend while downloading files on win32.... (Closed)

Created:
11 years, 2 months ago by bdonlan
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski, Paul Godavari, pam+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

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 <bdonlan@gmail.com>; BUG=25420 TEST=Download a large file with the system sleep timeout set to a short interval. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29873

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 28

Patch Set 7 : '' #

Total comments: 15

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : 'Fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -1 line) Patch
M AUTHORS View 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/download/download_file.h View 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/download/download_file.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
A chrome/browser/power_save_blocker.h View 5 6 7 1 chunk +42 lines, -0 lines 0 comments Download
A chrome/browser/power_save_blocker_common.cc View 5 6 7 1 chunk +58 lines, -0 lines 0 comments Download
A chrome/browser/power_save_blocker_stub.cc View 5 6 7 8 9 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/browser/power_save_blocker_win.cc View 5 6 7 1 chunk +21 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 5 6 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
bdonlan
11 years, 2 months ago (2009-10-17 05:11:26 UTC) #1
Lei Zhang
http://codereview.chromium.org/287017/diff/3001/15 File chrome/common/platform_util_win.cc (right): http://codereview.chromium.org/287017/diff/3001/15#newcode177 Line 177: SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED); If the thread that called ...
11 years, 2 months ago (2009-10-19 18:06:51 UTC) #2
bdonlan
http://codereview.chromium.org/287017/diff/3001/15 File chrome/common/platform_util_win.cc (right): http://codereview.chromium.org/287017/diff/3001/15#newcode177 Line 177: SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED); On 2009/10/19 18:06:51, Lei Zhang ...
11 years, 2 months ago (2009-10-19 19:00:33 UTC) #3
Evan Stade
I am the wrong reviewer. Trying a couple other dudes.
11 years, 2 months ago (2009-10-19 19:03:56 UTC) #4
bdonlan
On 2009/10/19 19:03:56, Evan Stade wrote: > I am the wrong reviewer. Trying a couple ...
11 years, 2 months ago (2009-10-19 19:08:40 UTC) #5
cpu_(ooo_6.6-7.5)
I am looking into this now. I like your approach but the use of TLS ...
11 years, 2 months ago (2009-10-19 20:58:48 UTC) #6
bdonlan
On 2009/10/19 20:58:48, cpu wrote: > I am looking into this now. > > I ...
11 years, 2 months ago (2009-10-19 23:46:44 UTC) #7
bdonlan
11 years, 2 months ago (2009-10-19 23:46:55 UTC) #8
cpu_(ooo_6.6-7.5)
Thanks for your patience. I can see you have considered several approaches, I also spent ...
11 years, 2 months ago (2009-10-20 02:53:41 UTC) #9
bdonlan
On 2009/10/20 02:53:41, cpu wrote: > Thanks for your patience. > > I can see ...
11 years, 2 months ago (2009-10-20 02:56:59 UTC) #10
Finnur
Drive-by question... Will this interfere with the user's ability to manually put a laptop in ...
11 years, 2 months ago (2009-10-20 02:59:54 UTC) #11
bdonlan
On 2009/10/20 02:59:54, Finnur wrote: > Drive-by question... > Will this interfere with the user's ...
11 years, 2 months ago (2009-10-20 03:14:59 UTC) #12
bdonlan
On 2009/10/20 02:53:41, cpu wrote: > Thanks for your patience. > > I can see ...
11 years, 2 months ago (2009-10-20 14:54:57 UTC) #13
bdonlan
And updated again to fix lint errors. Just now found out about 'gcl lint' :) ...
11 years, 2 months ago (2009-10-20 15:10:46 UTC) #14
cpu_(ooo_6.6-7.5)
Ok after more consideration I agree to the post to the UI thread approach. The ...
11 years, 2 months ago (2009-10-20 18:36:23 UTC) #15
bdonlan
On 2009/10/20 18:36:23, cpu wrote: > Ok after more consideration I agree to the post ...
11 years, 2 months ago (2009-10-20 21:04:03 UTC) #16
cpu_(ooo_6.6-7.5)
"The system maintains a count of applications that have called SetThreadExecutionState. The system tracks each ...
11 years, 2 months ago (2009-10-20 21:57:44 UTC) #17
bdonlan
On 2009/10/20 21:57:44, cpu wrote: > "The system maintains a count of applications that have ...
11 years, 2 months ago (2009-10-21 03:22:33 UTC) #18
Mark Mentovai
Nice job. You should familiarize yourself with our style guide when you have a chance. ...
11 years, 2 months ago (2009-10-21 04:49:16 UTC) #19
pink (ping after 24hrs)
Are bugs filed for the Mac and Linux implementation?
11 years, 2 months ago (2009-10-21 15:39:58 UTC) #20
Lei Zhang
On 2009/10/21 15:39:58, pink wrote: > Are bugs filed for the Mac and Linux implementation? ...
11 years, 2 months ago (2009-10-21 19:03:06 UTC) #21
bdonlan
Here's an updated patch - hopefully the style's a bit better now :) @cpu - ...
11 years, 2 months ago (2009-10-21 22:15:03 UTC) #22
bdonlan
http://codereview.chromium.org/287017/diff/17001/18005 File chrome/browser/power_save_blocker.h (right): http://codereview.chromium.org/287017/diff/17001/18005#newcode12 Line 12: bool enabled_; On 2009/10/21 04:49:16, Mark Mentovai wrote: ...
11 years, 2 months ago (2009-10-21 22:15:09 UTC) #23
cpu_(ooo_6.6-7.5)
Regarding the count question. I see now the need. What its left is some style ...
11 years, 2 months ago (2009-10-22 01:05:25 UTC) #24
Mark Mentovai
http://codereview.chromium.org/287017/diff/19002/20006 File chrome/browser/download/download_file.h (right): http://codereview.chromium.org/287017/diff/19002/20006#newcode55 Line 55: #include "chrome/browser/power_save_blocker.h" Sort: c comes between b and ...
11 years, 2 months ago (2009-10-22 01:23:25 UTC) #25
bdonlan
Updated per style reviews. http://codereview.chromium.org/287017/diff/19002/20006 File chrome/browser/download/download_file.h (right): http://codereview.chromium.org/287017/diff/19002/20006#newcode55 Line 55: #include "chrome/browser/power_save_blocker.h" On 2009/10/22 ...
11 years, 2 months ago (2009-10-22 02:05:12 UTC) #26
cpu_(ooo_6.6-7.5)
LGTM
11 years, 2 months ago (2009-10-22 18:21:26 UTC) #27
bdonlan
On 2009/10/22 18:21:26, cpu wrote: > LGTM Good to hear :) What do I need ...
11 years, 2 months ago (2009-10-22 18:25:59 UTC) #28
bdonlan
Patch updated with AUTHORS entry :)
11 years, 2 months ago (2009-10-22 20:04:26 UTC) #29
Mark Mentovai
Sent to the try servers for testing.
11 years, 2 months ago (2009-10-22 20:15:14 UTC) #30
bdonlan
On 2009/10/22 20:15:14, Mark Mentovai wrote: > Sent to the try servers for testing. It ...
11 years, 2 months ago (2009-10-22 20:44:50 UTC) #31
Mark Mentovai
The files that repeated themselves were my fault. I'll do better on the next try ...
11 years, 2 months ago (2009-10-22 20:46:46 UTC) #32
bdonlan
11 years, 2 months ago (2009-10-22 20:51:02 UTC) #33
Mark Mentovai
New try jobs launched.
11 years, 2 months ago (2009-10-22 20:54:26 UTC) #34
bdonlan
Okay. BTW, I tried attaching a comment to my patch with gcl upload -m this ...
11 years, 2 months ago (2009-10-22 20:54:31 UTC) #35
bdonlan
On 2009/10/22 20:54:26, Mark Mentovai wrote: > New try jobs launched. Okay, now what's going ...
11 years, 2 months ago (2009-10-22 21:00:53 UTC) #36
Mark Mentovai
11 years, 2 months ago (2009-10-23 04:18:16 UTC) #37
r29873

Powered by Google App Engine
This is Rietveld 408576698