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

Unified Diff: trunk/src/chrome/browser/ui/startup/autolaunch_prompt_win.cc

Issue 102163002: Revert 238283 "Infobar system refactor." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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: trunk/src/chrome/browser/ui/startup/autolaunch_prompt_win.cc
===================================================================
--- trunk/src/chrome/browser/ui/startup/autolaunch_prompt_win.cc (revision 238401)
+++ trunk/src/chrome/browser/ui/startup/autolaunch_prompt_win.cc (working copy)
@@ -11,7 +11,6 @@
#include "chrome/browser/auto_launch_trial.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/infobars/confirm_infobar_delegate.h"
-#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
@@ -37,12 +36,12 @@
// The delegate for the infobar shown when Chrome is auto-launched.
class AutolaunchInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
- // Creates an autolaunch infobar and delegate and adds the infobar to
- // |infobar_service|.
+ // Creates an autolaunch infobar delegate and adds it to |infobar_service|.
static void Create(InfoBarService* infobar_service, Profile* profile);
private:
- explicit AutolaunchInfoBarDelegate(Profile* profile);
+ AutolaunchInfoBarDelegate(InfoBarService* infobar_service,
+ Profile* profile);
virtual ~AutolaunchInfoBarDelegate();
void set_should_expire() { should_expire_ = true; }
@@ -71,14 +70,14 @@
// static
void AutolaunchInfoBarDelegate::Create(InfoBarService* infobar_service,
Profile* profile) {
- infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
- scoped_ptr<ConfirmInfoBarDelegate>(
- new AutolaunchInfoBarDelegate(profile))));
+ infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
+ new AutolaunchInfoBarDelegate(infobar_service, profile)));
}
AutolaunchInfoBarDelegate::AutolaunchInfoBarDelegate(
+ InfoBarService* infobar_service,
Profile* profile)
- : ConfirmInfoBarDelegate(),
+ : ConfirmInfoBarDelegate(infobar_service),
profile_(profile),
should_expire_(false),
weak_factory_(this) {

Powered by Google App Engine
This is Rietveld 408576698