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

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

Issue 2724073005: Remove NavigationManager::GetPreviousItem(). (Closed)
Patch Set: Address comments. 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') | 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 ecaf6d83caf592f9d55d4303377fe7c7529b1020..756c856bd407813cb79ca67007e5bacb81e2ad50 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"
@@ -1710,7 +1711,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698