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

Unified Diff: chrome/browser/download/download_request_infobar_delegate.cc

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/download/download_request_infobar_delegate.cc
===================================================================
--- chrome/browser/download/download_request_infobar_delegate.cc (revision 226624)
+++ chrome/browser/download/download_request_infobar_delegate.cc (working copy)
@@ -4,6 +4,7 @@
#include "chrome/browser/download/download_request_infobar_delegate.h"
+#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -10,7 +11,7 @@
#include "ui/base/l10n/l10n_util.h"
DownloadRequestInfoBarDelegate::FakeCreateCallback*
- DownloadRequestInfoBarDelegate::callback_ = NULL;
+ DownloadRequestInfoBarDelegate::callback_ = NULL;
DownloadRequestInfoBarDelegate::~DownloadRequestInfoBarDelegate() {
if (!responded_ && host_)
@@ -35,8 +36,9 @@
// "downloads" permission) to automatically download >1 files.
host->Cancel();
} else {
- infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
- new DownloadRequestInfoBarDelegate(infobar_service, host)));
+ infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
+ scoped_ptr<ConfirmInfoBarDelegate>(
+ new DownloadRequestInfoBarDelegate(host))));
}
}
@@ -45,11 +47,10 @@
FakeCreateCallback* callback) {
DownloadRequestInfoBarDelegate::callback_ = callback;
}
-#
+
DownloadRequestInfoBarDelegate::DownloadRequestInfoBarDelegate(
- InfoBarService* infobar_service,
base::WeakPtr<DownloadRequestLimiter::TabDownloadState> host)
- : ConfirmInfoBarDelegate(infobar_service),
+ : ConfirmInfoBarDelegate(),
responded_(false),
host_(host) {
}

Powered by Google App Engine
This is Rietveld 408576698