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

Side by Side Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2687343003: Fixed navigation for displayed SSL interstitials. (Closed)
Patch Set: Preserve old behavior of pending navigation index is disabled. 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 unified diff | Download patch
« no previous file with comments | « ios/web/interstitials/web_interstitial_impl.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/web_state/ui/crw_web_controller.h" 5 #import "ios/web/web_state/ui/crw_web_controller.h"
6 6
7 #import <WebKit/WebKit.h> 7 #import <WebKit/WebKit.h>
8 8
9 #import <objc/runtime.h> 9 #import <objc/runtime.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 return; 2123 return;
2124 } 2124 }
2125 2125
2126 if (!_webStateImpl->IsShowingWebInterstitial()) 2126 if (!_webStateImpl->IsShowingWebInterstitial())
2127 [self recordStateInHistory]; 2127 [self recordStateInHistory];
2128 CRWSessionEntry* fromEntry = sessionController.currentEntry; 2128 CRWSessionEntry* fromEntry = sessionController.currentEntry;
2129 CRWSessionEntry* toEntry = entries[index]; 2129 CRWSessionEntry* toEntry = entries[index];
2130 2130
2131 NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; 2131 NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
2132 if (![userDefaults boolForKey:@"PendingIndexNavigationDisabled"]) { 2132 if (![userDefaults boolForKey:@"PendingIndexNavigationDisabled"]) {
2133 [self clearTransientContentView];
2134
2133 BOOL sameDocumentNavigation = [sessionController 2135 BOOL sameDocumentNavigation = [sessionController
2134 isSameDocumentNavigationBetweenItem:fromEntry.navigationItem 2136 isSameDocumentNavigationBetweenItem:fromEntry.navigationItem
2135 andItem:toEntry.navigationItem]; 2137 andItem:toEntry.navigationItem];
2136 if (sameDocumentNavigation) { 2138 if (sameDocumentNavigation) {
2137 [self.sessionController goToItemAtIndex:index]; 2139 [self.sessionController goToItemAtIndex:index];
2138 // TODO(crbug.com/684098): move this call out this block to avoid code 2140 // TODO(crbug.com/684098): move this call out this block to avoid code
2139 // duplication. 2141 // duplication.
2140 [self webWillFinishHistoryNavigationFromEntry:fromEntry]; 2142 [self webWillFinishHistoryNavigationFromEntry:fromEntry];
2141 [self updateHTML5HistoryState]; 2143 [self updateHTML5HistoryState];
2142 } else { 2144 } else {
(...skipping 3141 matching lines...) Expand 10 before | Expand all | Expand 10 after
5284 - (void)simulateLoadRequestWithURL:(const GURL&)URL { 5286 - (void)simulateLoadRequestWithURL:(const GURL&)URL {
5285 _lastRegisteredRequestURL = URL; 5287 _lastRegisteredRequestURL = URL;
5286 _loadPhase = web::LOAD_REQUESTED; 5288 _loadPhase = web::LOAD_REQUESTED;
5287 } 5289 }
5288 5290
5289 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { 5291 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action {
5290 return [action.request valueForHTTPHeaderField:@"Referer"]; 5292 return [action.request valueForHTTPHeaderField:@"Referer"];
5291 } 5293 }
5292 5294
5293 @end 5295 @end
OLDNEW
« no previous file with comments | « ios/web/interstitials/web_interstitial_impl.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698