| Index: chrome/browser/automation/testing_automation_provider.cc
|
| ===================================================================
|
| --- chrome/browser/automation/testing_automation_provider.cc (revision 238220)
|
| +++ chrome/browser/automation/testing_automation_provider.cc (working copy)
|
| @@ -63,6 +63,7 @@
|
| #include "chrome/browser/history/history_service_factory.h"
|
| #include "chrome/browser/history/top_sites.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/lifetime/application_lifetime.h"
|
| #include "chrome/browser/notifications/balloon.h"
|
| @@ -1998,7 +1999,7 @@
|
| InfoBarService* infobar_service = InfoBarService::FromWebContents(wc);
|
| for (size_t i = 0; i < infobar_service->infobar_count(); ++i) {
|
| DictionaryValue* infobar_item = new DictionaryValue;
|
| - InfoBarDelegate* infobar = infobar_service->infobar_at(i);
|
| + InfoBarDelegate* infobar = infobar_service->infobar_at(i)->delegate();
|
| switch (infobar->GetInfoBarAutomationType()) {
|
| case InfoBarDelegate::CONFIRM_INFOBAR:
|
| infobar_item->SetString("type", "confirm_infobar");
|
| @@ -2079,12 +2080,12 @@
|
| infobar_index));
|
| return;
|
| }
|
| - InfoBarDelegate* infobar_delegate =
|
| - infobar_service->infobar_at(infobar_index);
|
| + InfoBar* infobar = infobar_service->infobar_at(infobar_index);
|
| + InfoBarDelegate* infobar_delegate = infobar->delegate();
|
|
|
| if (action == "dismiss") {
|
| infobar_delegate->InfoBarDismissed();
|
| - infobar_service->RemoveInfoBar(infobar_delegate);
|
| + infobar_service->RemoveInfoBar(infobar);
|
| reply.SendSuccess(NULL);
|
| return;
|
| }
|
| @@ -2097,7 +2098,7 @@
|
| }
|
| if ((action == "accept") ?
|
| confirm_infobar_delegate->Accept() : confirm_infobar_delegate->Cancel())
|
| - infobar_service->RemoveInfoBar(infobar_delegate);
|
| + infobar_service->RemoveInfoBar(infobar);
|
| reply.SendSuccess(NULL);
|
| return;
|
| }
|
|
|