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

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

Issue 2915303002: Added NavigationManager::GetIndexOfItem(). (Closed)
Patch Set: rebase Created 3 years, 7 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/DEPS ('k') | ios/chrome/browser/ui/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index 02a6e5223b3406acf0d20f905cd4cce04c3afacf..504933b2492188de5ebe8f4de3c949889ce03cce 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -108,7 +108,6 @@
#include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
#import "ios/public/provider/chrome/browser/native_app_launcher/native_app_metadata.h"
#import "ios/public/provider/chrome/browser/native_app_launcher/native_app_whitelist_manager.h"
-#import "ios/web/navigation/crw_session_controller.h"
#import "ios/web/navigation/navigation_item_impl.h"
#import "ios/web/navigation/navigation_manager_impl.h"
#include "ios/web/public/favicon_status.h"
@@ -1076,14 +1075,9 @@ - (BOOL)canGoForward {
- (void)goToItem:(const web::NavigationItem*)item {
DCHECK(item);
-
- if (self.navigationManager) {
- CRWSessionController* sessionController =
- [self navigationManagerImpl]->GetSessionController();
- NSInteger itemIndex = [sessionController indexOfItem:item];
- DCHECK_NE(itemIndex, NSNotFound);
- self.navigationManager->GoToIndex(itemIndex);
- }
+ int index = self.navigationManager->GetIndexOfItem(item);
+ DCHECK_NE(index, -1);
+ self.navigationManager->GoToIndex(index);
}
- (BOOL)openExternalURL:(const GURL&)url
« no previous file with comments | « ios/chrome/browser/tabs/DEPS ('k') | ios/chrome/browser/ui/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698