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

Unified Diff: ios/shared/chrome/browser/tabs/web_state_list.mm

Issue 2766063002: Remove the concept of currentItemIndex (Closed)
Patch Set: fix unit tests Created 3 years, 9 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: ios/shared/chrome/browser/tabs/web_state_list.mm
diff --git a/ios/shared/chrome/browser/tabs/web_state_list.mm b/ios/shared/chrome/browser/tabs/web_state_list.mm
index 5da7b0cd66abb6bab602d30ca66da5cf4e42b576..d4941fdfb04836d378e686ab0c7a39a9917d4a72 100644
--- a/ios/shared/chrome/browser/tabs/web_state_list.mm
+++ b/ios/shared/chrome/browser/tabs/web_state_list.mm
@@ -301,7 +301,8 @@ bool WasOpenedBy(const web::WebState* opener,
return kInvalidIndex;
const int opener_navigation_index =
- use_group ? opener->GetNavigationManager()->GetCurrentItemIndex() : -1;
+ use_group ? opener->GetNavigationManager()->GetLastCommittedItemIndex()
+ : -1;
int found_index = kInvalidIndex;
for (int index = start_index + 1; index < count() && n; ++index) {

Powered by Google App Engine
This is Rietveld 408576698