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

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2737203002: Remove CRWSessionEntry. (Closed)
Patch Set: fix XCode-clang build 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/public/web_state/ui/crw_web_delegate.h ('k') | ios/web/web_state/ui/crw_web_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index a2f1da57271a871674acd36243f7da53ea3b6dd7..e05932577ba0c9da26e6bca6aaa915dc2fac5c22 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -683,15 +683,15 @@ - (void)applyWebViewScrollOffsetFromScrollState:
(const web::PageScrollState&)scrollState;
// Returns the referrer for the current page.
- (web::Referrer)currentReferrer;
-// Adds a new CRWSessionEntry with the given URL and state object to the history
+// Adds a new NavigationItem with the given URL and state object to the history
// stack. A state object is a serialized generic JavaScript object that contains
-// details of the UI's state for a given CRWSessionEntry/URL.
+// details of the UI's state for a given NavigationItem/URL.
// TODO(stuartmorgan): Move the pushState/replaceState logic into
// NavigationManager.
- (void)pushStateWithPageURL:(const GURL&)pageURL
stateObject:(NSString*)stateObject
transition:(ui::PageTransition)transition;
-// Assigns the given URL and state object to the current CRWSessionEntry.
+// Assigns the given URL and state object to the current NavigationItem.
- (void)replaceStateWithPageURL:(const GURL&)pageUrl
stateObject:(NSString*)stateObject;
// Sets _documentURL to newURL, and updates any relevant state information.
@@ -2108,7 +2108,7 @@ - (void)loadCancelled {
- (void)goToItemAtIndex:(int)index {
CRWSessionController* sessionController = self.sessionController;
- web::NavigationItemList items = sessionController.items;
+ const web::ScopedNavigationItemImplList& items = sessionController.items;
if (index < 0 || index >= static_cast<int>(items.size())) {
NOTREACHED();
return;
@@ -2117,7 +2117,7 @@ - (void)goToItemAtIndex:(int)index {
if (!_webStateImpl->IsShowingWebInterstitial())
[self recordStateInHistory];
web::NavigationItem* fromItem = sessionController.currentItem;
- web::NavigationItem* toItem = items[index];
+ web::NavigationItem* toItem = items[index].get();
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
if (![userDefaults boolForKey:@"PendingIndexNavigationDisabled"]) {
« no previous file with comments | « ios/web/public/web_state/ui/crw_web_delegate.h ('k') | ios/web/web_state/ui/crw_web_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698