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

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

Issue 2724073005: Remove NavigationManager::GetPreviousItem(). (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
« no previous file with comments | « no previous file | ios/chrome/browser/tabs/tab_model.h » ('j') | ios/web/navigation/crw_session_controller.mm » ('J')
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 bfa629b651bb45f03e5e517d5ff487df38c31308..da429091de85a2bb6cfdf76c8566715fefc32e10 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -128,6 +128,7 @@
#include "ios/web/public/favicon_status.h"
#include "ios/web/public/favicon_url.h"
#include "ios/web/public/interstitials/web_interstitial.h"
+#include "ios/web/public/load_committed_details.h"
#import "ios/web/public/navigation_manager.h"
#include "ios/web/public/referrer.h"
#import "ios/web/public/serializable_user_data_manager.h"
@@ -1733,7 +1734,14 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
object:parentTabModel_
userInfo:@{kTabModelTabKey : self}];
}
- [parentTabModel_ navigationCommittedInTab:self];
+
+ web::NavigationItem* previousItem = nullptr;
+ if (details.previous_item_index >= 0) {
+ previousItem = webState->GetNavigationManager()->GetItemAtIndex(
+ details.previous_item_index);
+ }
+
+ [parentTabModel_ navigationCommittedInTab:self previousItem:previousItem];
// Sending a notification about the url change for crash reporting.
// TODO(crbug.com/661675): Consider using the navigation entry committed
« no previous file with comments | « no previous file | ios/chrome/browser/tabs/tab_model.h » ('j') | ios/web/navigation/crw_session_controller.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698