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

Side by Side Diff: ios/web/navigation/crw_session_controller.mm

Issue 2766453002: Implement Reload for ORIGINAL_REQUEST_URL in NavigationManagerImpl. (Closed)
Patch Set: Addressed comments Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/web/navigation/crw_session_controller.h" 5 #import "ios/web/navigation/crw_session_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 NSInteger forwardItemStartIndex = _lastCommittedItemIndex + 1; 362 NSInteger forwardItemStartIndex = _lastCommittedItemIndex + 1;
363 DCHECK(forwardItemStartIndex >= 0); 363 DCHECK(forwardItemStartIndex >= 0);
364 364
365 size_t itemCount = self.items.size(); 365 size_t itemCount = self.items.size();
366 if (forwardItemStartIndex >= static_cast<NSInteger>(itemCount)) 366 if (forwardItemStartIndex >= static_cast<NSInteger>(itemCount))
367 return; 367 return;
368 368
369 if (_previousItemIndex >= forwardItemStartIndex) 369 if (_previousItemIndex >= forwardItemStartIndex)
370 _previousItemIndex = -1; 370 _previousItemIndex = -1;
371 371
372 // Remove the NavigationItems and notify the NavigationManater 372 // Remove the NavigationItems and notify the NavigationManager.
373 _items.erase(_items.begin() + forwardItemStartIndex, _items.end()); 373 _items.erase(_items.begin() + forwardItemStartIndex, _items.end());
374 if (_navigationManager) { 374 if (_navigationManager) {
375 _navigationManager->OnNavigationItemsPruned(itemCount - 375 _navigationManager->OnNavigationItemsPruned(itemCount -
376 forwardItemStartIndex); 376 forwardItemStartIndex);
377 } 377 }
378 } 378 }
379 379
380 - (void)commitPendingItem { 380 - (void)commitPendingItem {
381 if (self.pendingItem) { 381 if (self.pendingItem) {
382 // Once an item is committed it's not renderer-initiated any more. (Matches 382 // Once an item is committed it's not renderer-initiated any more. (Matches
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 return item; 621 return item;
622 } 622 }
623 623
624 - (BOOL)isRedirectTransitionForItemAtIndex:(size_t)index { 624 - (BOOL)isRedirectTransitionForItemAtIndex:(size_t)index {
625 DCHECK_LT(index, self.items.size()); 625 DCHECK_LT(index, self.items.size());
626 ui::PageTransition transition = self.items[index]->GetTransitionType(); 626 ui::PageTransition transition = self.items[index]->GetTransitionType();
627 return (transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK) ? YES : NO; 627 return (transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK) ? YES : NO;
628 } 628 }
629 629
630 @end 630 @end
OLDNEW
« no previous file with comments | « no previous file | ios/web/navigation/navigation_manager_impl.mm » ('j') | ios/web/navigation/navigation_manager_impl.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698