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

Unified Diff: ios/chrome/browser/tabs/tab_model.mm

Issue 2690893003: Remove obsolete code in TabModelOrderController. (Closed)
Patch Set: Created 3 years, 10 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/chrome/browser/tabs/tab_model.mm
diff --git a/ios/chrome/browser/tabs/tab_model.mm b/ios/chrome/browser/tabs/tab_model.mm
index 914f08cc005fca259efcb2d40eb7935d67dea0a3..b2ae98e1f36b29f6dc3dcd775e18395c1410d7be 100644
--- a/ios/chrome/browser/tabs/tab_model.mm
+++ b/ios/chrome/browser/tabs/tab_model.mm
@@ -411,33 +411,6 @@ void CleanCertificatePolicyCache(
return nil;
}
-- (Tab*)firstTabWithOpener:(Tab*)tab {
- if (!tab)
- return nil;
- NSUInteger stopIndex = [self indexOfTab:tab];
- if (stopIndex == NSNotFound)
- return nil;
- NSString* parentID = tab.tabId;
- // Match the navigation index as well as the session id, to better match the
- // state of the tab. I.e. two tabs are opened via a link from tab A, and then
- // a new url is loaded into tab A, and more tabs opened from that url, the
- // latter two tabs should not be grouped with the former two. The navigation
- // index is the simplest way to detect navigation changes.
- DCHECK([tab navigationManager]);
- NSInteger parentNavIndex = [tab navigationManager]->GetCurrentItemIndex();
- for (NSUInteger i = 0; i < stopIndex; ++i) {
- Tab* tabToCheck = [self tabAtIndex:i];
- DCHECK([tabToCheck navigationManager]);
- CRWSessionController* sessionController =
- [tabToCheck navigationManager]->GetSessionController();
- if ([sessionController.openerId isEqualToString:parentID] &&
- sessionController.openerNavigationIndex == parentNavIndex) {
- return tabToCheck;
- }
- }
- return nil;
-}
-
- (Tab*)lastTabWithOpener:(Tab*)tab {
NSUInteger startIndex = [self indexOfTab:tab];
if (startIndex == NSNotFound)

Powered by Google App Engine
This is Rietveld 408576698