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

Unified Diff: chrome/browser/devtools/global_confirm_info_bar.cc

Issue 2335203003: Add metrics to keep track of the tab activate/deactivate cycle (Closed)
Patch Set: Addressed comments Created 4 years, 3 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/devtools/global_confirm_info_bar.cc
diff --git a/chrome/browser/devtools/global_confirm_info_bar.cc b/chrome/browser/devtools/global_confirm_info_bar.cc
index d25d08e904df81587d5684aa37fd39ff9b4816e0..9210099b15e7aa8fd6335390afaac20a4f54fb44 100644
--- a/chrome/browser/devtools/global_confirm_info_bar.cc
+++ b/chrome/browser/devtools/global_confirm_info_bar.cc
@@ -160,7 +160,10 @@ GlobalConfirmInfoBar::~GlobalConfirmInfoBar() {
}
}
-void GlobalConfirmInfoBar::TabInsertedAt(content::WebContents* web_contents,
+// Do not use |tab_strip_model| as it may be null from the call in
+// TabChangedAt().
+void GlobalConfirmInfoBar::TabInsertedAt(TabStripModel* tab_strip_model,
+ content::WebContents* web_contents,
int index,
bool foreground) {
InfoBarService* infobar_service =
@@ -189,7 +192,7 @@ void GlobalConfirmInfoBar::TabChangedAt(content::WebContents* web_contents,
InfoBarService::FromWebContents(web_contents);
auto it = proxies_.find(infobar_service);
if (it == proxies_.end())
- TabInsertedAt(web_contents, index, false);
+ TabInsertedAt(nullptr, web_contents, index, false);
}
void GlobalConfirmInfoBar::OnInfoBarRemoved(infobars::InfoBar* info_bar,

Powered by Google App Engine
This is Rietveld 408576698