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

Unified Diff: trunk/src/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm

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/cocoa/keystone_infobar_delegate.mm
===================================================================
--- trunk/src/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm (revision 238401)
+++ trunk/src/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm (working copy)
@@ -15,7 +15,6 @@
#include "base/prefs/pref_service.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"
#import "chrome/browser/mac/keystone_glue.h"
#include "chrome/browser/profiles/profile.h"
@@ -44,7 +43,8 @@
static void Create();
private:
- explicit KeystonePromotionInfoBarDelegate(PrefService* prefs);
+ KeystonePromotionInfoBarDelegate(InfoBarService* infobar_service,
+ PrefService* prefs);
virtual ~KeystonePromotionInfoBarDelegate();
// Sets this info bar to be able to expire. Called a predetermined amount
@@ -83,15 +83,17 @@
return;
InfoBarService* infobar_service =
InfoBarService::FromWebContents(webContents);
- infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
- scoped_ptr<ConfirmInfoBarDelegate>(new KeystonePromotionInfoBarDelegate(
+ infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
+ new KeystonePromotionInfoBarDelegate(
+ infobar_service,
Profile::FromBrowserContext(
- webContents->GetBrowserContext())->GetPrefs()))));
+ webContents->GetBrowserContext())->GetPrefs())));
}
KeystonePromotionInfoBarDelegate::KeystonePromotionInfoBarDelegate(
+ InfoBarService* infobar_service,
PrefService* prefs)
- : ConfirmInfoBarDelegate(),
+ : ConfirmInfoBarDelegate(infobar_service),
prefs_(prefs),
can_expire_(false),
weak_ptr_factory_(this) {

Powered by Google App Engine
This is Rietveld 408576698