| Index: ios/web/navigation/navigation_manager_impl.mm
|
| diff --git a/ios/web/navigation/navigation_manager_impl.mm b/ios/web/navigation/navigation_manager_impl.mm
|
| index 372d8a0db5510cd30469c76609ab085bdf5be775..0f5b9dcde986b4b5fd71f19123af50fb06aa786f 100644
|
| --- a/ios/web/navigation/navigation_manager_impl.mm
|
| +++ b/ios/web/navigation/navigation_manager_impl.mm
|
| @@ -223,7 +223,7 @@ bool AreURLsInPageNavigation(const GURL& existing_url, const GURL& new_url) {
|
| }
|
|
|
| void NavigationManagerImpl::DiscardNonCommittedItems() {
|
| - [session_controller_ discardNonCommittedEntries];
|
| + [session_controller_ discardNonCommittedItems];
|
| }
|
|
|
| void NavigationManagerImpl::LoadIfNecessary() {
|
| @@ -259,9 +259,9 @@ bool AreURLsInPageNavigation(const GURL& existing_url, const GURL& new_url) {
|
| }
|
|
|
| int NavigationManagerImpl::GetPendingItemIndex() const {
|
| - if ([session_controller_ hasPendingEntry]) {
|
| - if ([session_controller_ pendingEntryIndex] != -1) {
|
| - return [session_controller_ pendingEntryIndex];
|
| + if ([session_controller_ pendingEntry]) {
|
| + if ([session_controller_ pendingItemIndex] != -1) {
|
| + return [session_controller_ pendingItemIndex];
|
| }
|
| // TODO(crbug.com/665189): understand why current item index is
|
| // returned here.
|
| @@ -285,7 +285,7 @@ bool AreURLsInPageNavigation(const GURL& existing_url, const GURL& new_url) {
|
| if (idx >= entries.count)
|
| return false;
|
|
|
| - [session_controller_ removeEntryAtIndex:index];
|
| + [session_controller_ removeItemAtIndex:index];
|
| return true;
|
| }
|
|
|
| @@ -342,12 +342,12 @@ bool AreURLsInPageNavigation(const GURL& existing_url, const GURL& new_url) {
|
| }
|
|
|
| int NavigationManagerImpl::GetIndexForOffset(int offset) const {
|
| - int result = [session_controller_ pendingEntryIndex] == -1
|
| + int result = [session_controller_ pendingItemIndex] == -1
|
| ? GetCurrentItemIndex()
|
| - : static_cast<int>([session_controller_ pendingEntryIndex]);
|
| + : static_cast<int>([session_controller_ pendingItemIndex]);
|
|
|
| if (offset < 0) {
|
| - if (GetTransientItem() && [session_controller_ pendingEntryIndex] == -1) {
|
| + if (GetTransientItem() && [session_controller_ pendingItemIndex] == -1) {
|
| // Going back from transient item that added to the end navigation stack
|
| // is a matter of discarding it as there is no need to move navigation
|
| // index back.
|
| @@ -371,7 +371,7 @@ bool AreURLsInPageNavigation(const GURL& existing_url, const GURL& new_url) {
|
| if (result > GetItemCount() /* overflow */)
|
| result = INT_MIN;
|
| } else if (offset > 0) {
|
| - if (GetPendingItem() && [session_controller_ pendingEntryIndex] == -1) {
|
| + if (GetPendingItem() && [session_controller_ pendingItemIndex] == -1) {
|
| // Chrome for iOS does not allow forward navigation if there is another
|
| // pending navigation in progress. Returning invalid index indicates that
|
| // forward navigation will not be allowed (and |INT_MAX| works for that).
|
|
|