Chromium Code Reviews| Index: chrome/browser/automation/automation_provider_observers.cc |
| diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc |
| index 0679c97560bfa1711d5f97d464c616e42c1cfeeb..f44ec0c4185e8fb8d20f91c3e1a7890377b0d40b 100644 |
| --- a/chrome/browser/automation/automation_provider_observers.cc |
| +++ b/chrome/browser/automation/automation_provider_observers.cc |
| @@ -33,6 +33,7 @@ |
| #include "chrome/browser/extensions/extension_updater.h" |
| #include "chrome/browser/history/history_types.h" |
| #include "chrome/browser/history/top_sites.h" |
| +#include "chrome/browser/infobars/infobar_tab_helper.h" |
| #include "chrome/browser/metrics/metric_event_duration_details.h" |
| #include "chrome/browser/notifications/balloon.h" |
| #include "chrome/browser/notifications/balloon_collection.h" |
| @@ -1372,7 +1373,7 @@ void InfoBarCountObserver::Observe(int type, |
| } |
| void InfoBarCountObserver::CheckCount() { |
| - if (tab_contents_->infobar_count() != target_count_) |
| + if (tab_contents_->infobar_tab_helper()->infobar_count() != target_count_) |
| return; |
| if (automation_) { |
| @@ -2289,9 +2290,10 @@ AutofillFormSubmittedObserver::~AutofillFormSubmittedObserver() { |
| if (tab_contents_) { |
| InfoBarDelegate* infobar = NULL; |
| - if (tab_contents_->infobar_count() > 0 && |
| - (infobar = tab_contents_->GetInfoBarDelegateAt(0))) { |
| - tab_contents_->RemoveInfoBar(infobar); |
| + if (tab_contents_->infobar_tab_helper()->infobar_count() > 0 && |
|
Peter Kasting
2011/08/31 18:47:32
Nit: Can you pull the infobar_tab_helper() out to
|
| + (infobar = |
| + tab_contents_->infobar_tab_helper()->GetInfoBarDelegateAt(0))) { |
| + tab_contents_->infobar_tab_helper()->RemoveInfoBar(infobar); |
| } |
| } |
| } |
| @@ -2320,7 +2322,8 @@ void AutofillFormSubmittedObserver::Observe( |
| // Accept in the infobar. |
| tab_contents_ = Source<TabContentsWrapper>(source).ptr(); |
| InfoBarDelegate* infobar = NULL; |
| - if (!(infobar = tab_contents_->GetInfoBarDelegateAt(0))) { |
| + if (!(infobar = |
|
Peter Kasting
2011/08/31 18:47:32
Nit: While here, remove this conditional entirely
|
| + tab_contents_->infobar_tab_helper()->GetInfoBarDelegateAt(0))) { |
| if (automation_) { |
| AutomationJSONReply( |
| automation_, reply_message_.release()).SendError( |