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

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

Issue 2690893003: Remove obsolete code in TabModelOrderController. (Closed)
Patch Set: Rebase on origin/master. 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
« no previous file with comments | « ios/chrome/browser/tabs/tab_model.h ('k') | ios/chrome/browser/tabs/tab_model_order_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 08fc2f599aa00c5298b1cff082345986ab461651..81d4528f24c9a787ebdaa95e55e618a7fdc818d2 100644
--- a/ios/chrome/browser/tabs/tab_model.mm
+++ b/ios/chrome/browser/tabs/tab_model.mm
@@ -364,33 +364,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 = [_tabs objectAtIndex: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)
« no previous file with comments | « ios/chrome/browser/tabs/tab_model.h ('k') | ios/chrome/browser/tabs/tab_model_order_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698