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

Issue 7466033: Fix warning prompting on closing a window that will cancel downloads. (Closed)

Created:
9 years, 5 months ago by Randy Smith (Not in Mondays)
Modified:
9 years, 2 months ago
CC:
chromium-reviews, asanka, rdsmith+dwatch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Fix warning prompting on closing a window that will cancel downloads. Handles two cases: Last window close (-> shuts download browser), and last incognito window in an incognito profile (-> cancels downloads on that profile). Note that this doesn't cover the macintosh, which goes through different code (http://crbug.com/88419) and the warning for incognito close is not ideal (http://crbug.com/88421). This CL includes some modularization to make resolving those issues easier. BUG=61257 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=105662 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=106958

Patch Set 1 #

Patch Set 2 : Fixed compile error. #

Patch Set 3 : Removed unneeded friend decls and tweaked a comment. #

Total comments: 40

Patch Set 4 : Incorporated comments from sky & jennb. #

Patch Set 5 : Fix compiler warning. #

Total comments: 4

Patch Set 6 : Incorporated comments, got test working. #

Patch Set 7 : Parallel view cleanup to gtk. #

Total comments: 2

Patch Set 8 : Updated comments on tabbing. #

Patch Set 9 : Various fixes related to try jobs. #

Total comments: 1

Patch Set 10 : Merged to LKGR after long hiatus. #

Patch Set 11 : Merge fixes and comment update. #

Patch Set 12 : Fixing trybot failures (chromeos specifically). #

Total comments: 12

Patch Set 13 : Sync'd to near TOT and adapted to new test setup requirements. #

Patch Set 14 : Fix testing and choosing of entry browser to handle closes-in-progress on mac. #

Patch Set 15 : Fixed Achuith's comments. #

Patch Set 16 : Merged up to latest (mostly around DownloadService changes. #

Total comments: 45

Patch Set 17 : Incoporated comments, primarily from Achuith. #

Total comments: 2

Patch Set 18 : Last little things from Achuith and Miranda. #

Total comments: 6

Patch Set 19 : Removed test case specification hack. #

Patch Set 20 : Removed some unneeded include files. #

Patch Set 21 : Incorporated believed last set of comments. #

Patch Set 22 : Fixed typo. #

Patch Set 23 : Incorporated comments + doubled test instances. #

Patch Set 24 : Merge to LKGR. #

Patch Set 25 : Merged to LKGR. #

Patch Set 26 : Make sure to use temporary download directory #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1238 lines, -515 lines) Patch
M chrome/browser/download/download_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 17 chunks +49 lines, -404 lines 0 comments Download
M chrome/browser/download/download_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/download/download_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +23 lines, -0 lines 0 comments Download
A chrome/browser/download/download_test_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +181 lines, -0 lines 0 comments Download
A chrome/browser/download/download_test_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +297 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +23 lines, -4 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 4 chunks +70 lines, -92 lines 0 comments Download
A chrome/browser/ui/browser_close_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +551 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_list.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +12 lines, -9 lines 0 comments Download
M chrome/browser/ui/gtk/download/download_in_progress_dialog_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +12 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/download/download_in_progress_dialog_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +12 lines, -3 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (0 generated)
Randy Smith (Not in Mondays)
PTAL. This is an MS-14 issue (I know, down to the wire) so if you ...
9 years, 5 months ago (2011-07-21 17:29:39 UTC) #1
Miranda Callahan
On 2011/07/21 17:29:39, rdsmith wrote: > PTAL. This is an MS-14 issue (I know, down ...
9 years, 5 months ago (2011-07-21 17:42:44 UTC) #2
Randy Smith (Not in Mondays)
On 2011/07/21 17:42:44, Miranda Callahan wrote: > ProfileManager usage in CheckDownloadsInProgress LGTM. Thanks! > I'm ...
9 years, 5 months ago (2011-07-21 17:46:12 UTC) #3
jennb
Thanks for the cc. Couple small nits. http://codereview.chromium.org/7466033/diff/4001/chrome/browser/download/download_test_observer.h File chrome/browser/download/download_test_observer.h (right): http://codereview.chromium.org/7466033/diff/4001/chrome/browser/download/download_test_observer.h#newcode14 chrome/browser/download/download_test_observer.h:14: #include "chrome/browser/download/download_item.h" ...
9 years, 5 months ago (2011-07-21 18:35:33 UTC) #4
sky
http://codereview.chromium.org/7466033/diff/4001/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/7466033/diff/4001/chrome/browser/ui/browser.cc#newcode1061 chrome/browser/ui/browser.cc:1061: // Let's figure out if we are the last ...
9 years, 5 months ago (2011-07-21 20:08:11 UTC) #5
Randy Smith (Not in Mondays)
Next round. Miranda, based on sky's comments I've added methods to Profile and ProfileManager, could ...
9 years, 5 months ago (2011-07-21 21:36:31 UTC) #6
ahendrickson
chrome/browser/download/*: LGTM.
9 years, 5 months ago (2011-07-21 22:10:25 UTC) #7
Evan Stade
lgtm http://codereview.chromium.org/7466033/diff/11001/chrome/browser/ui/gtk/download/download_in_progress_dialog_gtk.cc File chrome/browser/ui/gtk/download/download_in_progress_dialog_gtk.cc (right): http://codereview.chromium.org/7466033/diff/11001/chrome/browser/ui/gtk/download/download_in_progress_dialog_gtk.cc#newcode25 chrome/browser/ui/gtk/download/download_in_progress_dialog_gtk.cc:25: &download_count); looks like this would fit on the ...
9 years, 5 months ago (2011-07-21 22:59:48 UTC) #8
Miranda Callahan
Profiles LGTM, with nitty ternary-op suggestion. http://codereview.chromium.org/7466033/diff/11001/chrome/browser/profiles/profile.cc File chrome/browser/profiles/profile.cc (right): http://codereview.chromium.org/7466033/diff/11001/chrome/browser/profiles/profile.cc#newcode859 chrome/browser/profiles/profile.cc:859: return GetDownloadManager()->in_progress_count(); A ...
9 years, 5 months ago (2011-07-21 23:04:17 UTC) #9
sky
http://codereview.chromium.org/7466033/diff/4001/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/7466033/diff/4001/chrome/browser/ui/browser.cc#newcode1084 chrome/browser/ui/browser.cc:1084: || !browser->is_type_tabbed()) On 2011/07/21 21:36:31, rdsmith wrote: > On ...
9 years, 5 months ago (2011-07-22 03:00:40 UTC) #10
Randy Smith (Not in Mondays)
Next round. The test works! Sky, this means I'm planning to commit this as a ...
9 years, 5 months ago (2011-07-22 20:41:30 UTC) #11
jennb
driving by again... :-) http://codereview.chromium.org/7466033/diff/15019/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/7466033/diff/15019/chrome/browser/ui/browser.cc#newcode1077 chrome/browser/ui/browser.cc:1077: // Only consider tabbed browser ...
9 years, 5 months ago (2011-07-22 21:02:39 UTC) #12
Randy Smith (Not in Mondays)
http://codereview.chromium.org/7466033/diff/15019/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/7466033/diff/15019/chrome/browser/ui/browser.cc#newcode1077 chrome/browser/ui/browser.cc:1077: // Only consider tabbed browser windows, not popups. On ...
9 years, 5 months ago (2011-07-22 21:12:47 UTC) #13
sky
Much nicer. browser/ui LGTM
9 years, 5 months ago (2011-07-22 21:15:19 UTC) #14
ahendrickson
chrome/browser/download/*: LGTM
9 years, 5 months ago (2011-07-25 15:24:58 UTC) #15
Randy Smith (Not in Mondays)
Asanka, could you take a look at the views/ code? Dominic doesn't appear to be ...
9 years, 4 months ago (2011-07-28 22:04:50 UTC) #16
Randy Smith (Not in Mondays)
Asanka? JennB? I think I'm getting close so I'm wanting to get approvals in place ...
9 years, 4 months ago (2011-08-03 22:01:12 UTC) #17
asanka
LGTM http://codereview.chromium.org/7466033/diff/21001/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/7466033/diff/21001/chrome/browser/ui/browser.cc#newcode1075 chrome/browser/ui/browser.cc:1075: // this is not the last regular browser ...
9 years, 4 months ago (2011-08-04 19:07:10 UTC) #18
jennb
LGTM Sorry, didn't think you needed one from me!
9 years, 4 months ago (2011-08-05 17:47:36 UTC) #19
Randy Smith (Not in Mondays)
Sorry for the long hiatus; vacation and priority shifts. I have all LGTMs and think ...
9 years, 4 months ago (2011-08-23 23:49:10 UTC) #20
sky
I'm sticked with my LGTM On Tue, Aug 23, 2011 at 4:49 PM, <rdsmith@chromium.org> wrote: ...
9 years, 4 months ago (2011-08-24 00:08:11 UTC) #21
asanka
LGTM. Thanks!
9 years, 4 months ago (2011-08-24 02:40:37 UTC) #22
Randy Smith (Not in Mondays)
Achuith: Willing to glance at the latest changes to browser_close_browsertest.cc for ChromeOS?
9 years, 4 months ago (2011-08-25 20:07:45 UTC) #23
achuithb
LGTM on the cros downloads panel code. A few nits as I took a quick ...
9 years, 3 months ago (2011-08-29 17:19:08 UTC) #24
Randy Smith (Not in Mondays)
Below comments are in response to Achuith's comments, but I've let this CL lie fallow ...
9 years, 2 months ago (2011-10-13 20:06:04 UTC) #25
sky
SLGTM http://codereview.chromium.org/7466033/diff/61002/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/7466033/diff/61002/chrome/browser/ui/browser.cc#newcode1079 chrome/browser/ui/browser.cc:1079: browser->is_attempting_to_close_browser_) nit: move this up to the previous ...
9 years, 2 months ago (2011-10-13 20:23:43 UTC) #26
achuithb
Sorry for the late comments. Almost all are nits/minor. The only real concern I have ...
9 years, 2 months ago (2011-10-13 23:05:08 UTC) #27
Randy Smith (Not in Mondays)
Incorporated comments from Achuith and Scott. Miranda/Scott: Achuith's asked me to make a minor improvement ...
9 years, 2 months ago (2011-10-14 00:37:41 UTC) #28
sky
The 'readable and concise' changes LGTM -Scott On Thu, Oct 13, 2011 at 5:37 PM, ...
9 years, 2 months ago (2011-10-14 04:13:57 UTC) #29
Miranda Callahan
LGTM as well -- just caught a nitlet noted below... http://codereview.chromium.org/7466033/diff/67002/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/7466033/diff/67002/chrome/browser/ui/browser.cc#newcode43 ...
9 years, 2 months ago (2011-10-14 12:55:43 UTC) #30
Randy Smith (Not in Mondays)
Incorporated last little comments. Waiting for final LGTM from Achuith and opinion from Pawel. If ...
9 years, 2 months ago (2011-10-14 16:13:03 UTC) #31
achuithb
LGTM with 1 minor nit and 1 suggestion. Thanks for incorporating the comments - it's ...
9 years, 2 months ago (2011-10-14 19:22:09 UTC) #32
Randy Smith (Not in Mondays)
Thanks, Achuith! Comments all incorporated. I consider myself good WRT reviews at this point, but ...
9 years, 2 months ago (2011-10-14 19:30:47 UTC) #33
achuithb
On 2011/10/14 19:30:47, rdsmith wrote: > Thanks, Achuith! Comments all incorporated. I consider myself good ...
9 years, 2 months ago (2011-10-14 19:55:26 UTC) #34
Paweł Hajdan Jr.
http://codereview.chromium.org/7466033/diff/69001/chrome/browser/download/download_service.h File chrome/browser/download/download_service.h (right): http://codereview.chromium.org/7466033/diff/69001/chrome/browser/download/download_service.h#newcode36 chrome/browser/download/download_service.h:36: static int TotalDownloadCount(); nit: Unless there is an existing ...
9 years, 2 months ago (2011-10-14 21:26:19 UTC) #35
Randy Smith (Not in Mondays)
On 2011/10/14 19:55:26, achuith.bhandarkar wrote: > On 2011/10/14 19:30:47, rdsmith wrote: > > Thanks, Achuith! ...
9 years, 2 months ago (2011-10-14 21:49:48 UTC) #36
achuithb
Thinking out of the box, what do you think of: #define DOWNLOADS_CLOSE_CHECK(n) \ IN_PROC_BROWSER_TEST_F(BrowserCloseTest, DownloadsCloseCheck_##n) ...
9 years, 2 months ago (2011-10-14 21:59:50 UTC) #37
Randy Smith (Not in Mondays)
On 2011/10/14 21:59:50, achuith.bhandarkar wrote: > Thinking out of the box, what do you think ...
9 years, 2 months ago (2011-10-14 22:03:49 UTC) #38
Randy Smith (Not in Mondays)
http://codereview.chromium.org/7466033/diff/69001/chrome/browser/download/download_service.h File chrome/browser/download/download_service.h (right): http://codereview.chromium.org/7466033/diff/69001/chrome/browser/download/download_service.h#newcode36 chrome/browser/download/download_service.h:36: static int TotalDownloadCount(); On 2011/10/14 21:26:19, Paweł Hajdan Jr. ...
9 years, 2 months ago (2011-10-15 01:42:20 UTC) #39
Randy Smith (Not in Mondays)
Requesting re-review from ahendrickson for changes in last patchset (browser_close_browertest.cc only). Background: I committed this ...
9 years, 2 months ago (2011-10-20 22:28:10 UTC) #40
ahendrickson
browser_close_browertest.cc LGTM. Andy On 2011/10/20 22:28:10, rdsmith wrote: > Requesting re-review from ahendrickson for changes ...
9 years, 2 months ago (2011-10-20 22:46:44 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdsmith@chromium.org/7466033/89001
9 years, 2 months ago (2011-10-21 16:07:32 UTC) #42
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test. Builder is ...
9 years, 2 months ago (2011-10-21 19:38:12 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdsmith@chromium.org/7466033/89001
9 years, 2 months ago (2011-10-24 16:43:03 UTC) #44
commit-bot: I haz the power
9 years, 2 months ago (2011-10-24 19:37:06 UTC) #45
Change committed as 106958

Powered by Google App Engine
This is Rietveld 408576698