| 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 289b58521a8eb8e25436f90555bb22331089e4fe..43d4600d9b9c9be0efd186cb13946e2457dc4ee4 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
|
| @@ -21,9 +21,18 @@
|
|
|
| DownloadInProgressDialogGtk::DownloadInProgressDialogGtk(Browser* browser)
|
| : browser_(browser) {
|
| - int download_count =
|
| - DownloadServiceFactory::GetForProfile(
|
| - browser->profile())->GetDownloadManager()->in_progress_count();
|
| + int download_count;
|
| + Browser::DownloadClosePreventionType type =
|
| + browser_->OkToCloseWithInProgressDownloads(&download_count);
|
| +
|
| + // 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_NE(Browser::DOWNLOAD_CLOSE_OK, type);
|
| +
|
| + // 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;
|
|
|