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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 10830353: Introduce InfoBarTabService API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments, merge to LKGR Created 8 years, 4 months 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: chrome/browser/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 6216b1bf2e1be7e29c6943f3a5f508b3f8b05d35..361c9a93993177eee44816e1b41cb3b8820231ab 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -2175,7 +2175,7 @@ ListValue* TestingAutomationProvider::GetInfobarsInfo(WebContents* wc) {
ListValue* infobars = new ListValue;
InfoBarTabHelper* infobar_helper =
TabContents::FromWebContents(wc)->infobar_tab_helper();
- for (size_t i = 0; i < infobar_helper->infobar_count(); ++i) {
+ for (size_t i = 0; i < infobar_helper->GetInfoBarCount(); ++i) {
DictionaryValue* infobar_item = new DictionaryValue;
InfoBarDelegate* infobar = infobar_helper->GetInfoBarDelegateAt(i);
switch (infobar->GetInfoBarAutomationType()) {
@@ -2267,7 +2267,7 @@ void TestingAutomationProvider::PerformActionOnInfobar(
InfoBarDelegate* infobar = NULL;
size_t infobar_index = static_cast<size_t>(infobar_index_int);
- if (infobar_index >= infobar_helper->infobar_count()) {
+ if (infobar_index >= infobar_helper->GetInfoBarCount()) {
reply.SendError(StringPrintf("No such infobar at index %" PRIuS,
infobar_index));
return;
@@ -3786,7 +3786,7 @@ TranslateInfoBarDelegate* GetTranslateInfoBarDelegate(
WebContents* web_contents) {
InfoBarTabHelper* infobar_helper =
TabContents::FromWebContents(web_contents)->infobar_tab_helper();
- for (size_t i = 0; i < infobar_helper->infobar_count(); i++) {
+ for (size_t i = 0; i < infobar_helper->GetInfoBarCount(); i++) {
InfoBarDelegate* infobar = infobar_helper->GetInfoBarDelegateAt(i);
if (infobar->AsTranslateInfoBarDelegate())
return infobar->AsTranslateInfoBarDelegate();

Powered by Google App Engine
This is Rietveld 408576698