Chromium Code Reviews| Index: chrome/browser/ui/gtk/download/download_in_progress_dialog_gtk.cc |
| diff --git a/chrome/browser/ui/gtk/download/download_in_progress_dialog_gtk.cc b/chrome/browser/ui/gtk/download/download_in_progress_dialog_gtk.cc |
| index 387a24286568f009253f2019f956c1b33668c562..b766453cc0b7cea92862f3671308fce46509489f 100644 |
| --- a/chrome/browser/ui/gtk/download/download_in_progress_dialog_gtk.cc |
| +++ b/chrome/browser/ui/gtk/download/download_in_progress_dialog_gtk.cc |
| @@ -19,8 +19,19 @@ |
| DownloadInProgressDialogGtk::DownloadInProgressDialogGtk(Browser* browser) |
| : browser_(browser) { |
| - int download_count = browser->profile()->GetDownloadManager()-> |
| - in_progress_count(); |
| + int download_count; |
| + Browser::DownloadClosePreventionType type = |
| + browser_->OkToCloseWithInProgressDownloads( |
| + &download_count); |
|
Evan Stade
2011/07/21 22:59:48
looks like this would fit on the line above
Randy Smith (Not in Mondays)
2011/07/22 20:41:30
Yeah, not sure where that came from. Done.
|
| + |
| + // This dialog should have been created within the same thread invocation |
| + // as the original test that lead to us, so it should always not be ok |
| + // to close. |
| + DCHECK(type != Browser::DOWNLOAD_CLOSE_OK); |
| + |
| + // TODO(rdsmith): This dialog should be different depending on whether we're |
| + // closing the last incognito window of a profile or doing browser shutdown. |
| + // See http://crbug.com/88421. |
| std::string warning_text; |
| std::string explanation_text; |