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

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

Issue 2286803002: [ios] Do not reset SSL status if load was cancelled. (Closed)
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | 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 333f1f2536527a9dc03dc9d6fd7f3234a3047b13..ac54fae6cb1165cbe32452f382ac5e5a74d5c55b 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -3413,9 +3413,10 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
if (!inMainFrame && !userInteracted)
return;
- // Reset SSL status to default.
+ // Reset SSL status to default, unless the load was cancelled (manually or by
+ // back-forward navigation).
web::NavigationManager* navManager = self.webState->GetNavigationManager();
- if (navManager->GetLastCommittedItem())
+ if (navManager->GetLastCommittedItem() && [error code] != NSURLErrorCancelled)
navManager->GetLastCommittedItem()->GetSSL() = web::SSLStatus();
NSURL* errorURL = [NSURL
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698