| Index: chrome/browser/ui/auto_login_infobar_delegate.cc
|
| ===================================================================
|
| --- chrome/browser/ui/auto_login_infobar_delegate.cc (revision 238220)
|
| +++ chrome/browser/ui/auto_login_infobar_delegate.cc (working copy)
|
| @@ -13,6 +13,7 @@
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/chrome_notification_types.h"
|
| #include "chrome/browser/google/google_util.h"
|
| +#include "chrome/browser/infobars/infobar.h"
|
| #include "chrome/browser/infobars/infobar_service.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/signin/ubertoken_fetcher.h"
|
| @@ -127,19 +128,18 @@
|
| // static
|
| void AutoLoginInfoBarDelegate::Create(InfoBarService* infobar_service,
|
| const Params& params) {
|
| - infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
|
| + infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
|
| + scoped_ptr<ConfirmInfoBarDelegate>(
|
| #if defined(OS_ANDROID)
|
| - new AutoLoginInfoBarDelegateAndroid(infobar_service, params)
|
| + new AutoLoginInfoBarDelegateAndroid(params)
|
| #else
|
| - new AutoLoginInfoBarDelegate(infobar_service, params)
|
| + new AutoLoginInfoBarDelegate(params)
|
| #endif
|
| - ));
|
| + )));
|
| }
|
|
|
| -AutoLoginInfoBarDelegate::AutoLoginInfoBarDelegate(
|
| - InfoBarService* owner,
|
| - const Params& params)
|
| - : ConfirmInfoBarDelegate(owner),
|
| +AutoLoginInfoBarDelegate::AutoLoginInfoBarDelegate(const Params& params)
|
| + : ConfirmInfoBarDelegate(),
|
| params_(params),
|
| button_pressed_(false) {
|
| RecordHistogramAction(SHOWN);
|
| @@ -204,10 +204,7 @@
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) {
|
| DCHECK_EQ(chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, type);
|
| - // owner() can be NULL when InfoBarService removes us. See
|
| - // |InfoBarDelegate::clear_owner|.
|
| - if (owner())
|
| - owner()->RemoveInfoBar(this);
|
| + infobar()->RemoveSelf();
|
| }
|
|
|
| void AutoLoginInfoBarDelegate::RecordHistogramAction(Actions action) {
|
|
|