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) { |