Chromium Code Reviews| Index: ios/web/navigation/crw_session_controller.mm |
| diff --git a/ios/web/navigation/crw_session_controller.mm b/ios/web/navigation/crw_session_controller.mm |
| index ec96f47dcabb4f70455b788b5610428df4e61e56..0f2a413a176b69d03a2161e60dc03e5beb93a97b 100644 |
| --- a/ios/web/navigation/crw_session_controller.mm |
| +++ b/ios/web/navigation/crw_session_controller.mm |
| @@ -369,7 +369,7 @@ - (void)clearForwardItems { |
| if (_previousItemIndex >= forwardItemStartIndex) |
| _previousItemIndex = -1; |
| - // Remove the NavigationItems and notify the NavigationManater |
| + // Remove the NavigationItems and notify the NavigationManager. |
| _items.erase(_items.begin() + forwardItemStartIndex, _items.end()); |
| if (_navigationManager) { |
| _navigationManager->OnNavigationItemsPruned(itemCount - |
| @@ -544,6 +544,10 @@ - (void)removeItemAtIndex:(NSInteger)index { |
| _lastCommittedItemIndex--; |
| if (_previousItemIndex >= index) |
| _previousItemIndex--; |
| + |
|
liaoyuke
2017/03/27 16:22:43
I see the following code in clearForwardItems:
if
Eugene But (OOO till 7-30)
2017/03/27 17:15:47
Sounds reasonable, but it would be better to make
liaoyuke
2017/03/28 00:16:40
Acknowledged.
|
| + if (_navigationManager) { |
| + _navigationManager->OnNavigationItemsPruned(1U); |
| + } |
| } |
| - (BOOL)isSameDocumentNavigationBetweenItem:(web::NavigationItem*)firstItem |