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

Unified Diff: chrome/browser/ui/browser.cc

Issue 17382005: Unbreak tabs.onRemove extension API in face of fast tab closure Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't modify content Created 7 years, 6 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/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index ceab9ef5b947606f527e3f885760e36f54225043..d519e9469b0935eb7639fdcb6b635d0595390f14 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -982,11 +982,13 @@ void Browser::TabClosingAt(TabStripModel* tab_strip_model,
SetAsDelegate(contents, NULL);
}
-void Browser::TabDetachedAt(WebContents* contents, int index) {
+void Browser::TabDetachedAt(WebContents* contents,
+ int index,
+ bool closing_all) {
// TabDetachedAt is called before TabStripModel has updated the
// active index.
int old_active_index = tab_strip_model_->active_index();
- if (index < old_active_index && !tab_strip_model_->closing_all()) {
+ if (index < old_active_index && !closing_all) {
SessionService* session_service =
SessionServiceFactory::GetForProfileIfExisting(profile_);
if (session_service)

Powered by Google App Engine
This is Rietveld 408576698