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

Unified Diff: ios/web/navigation/crw_session_controller.mm

Issue 2775023002: add DCHECK that a server redirect pending item should never be added. (Closed)
Patch Set: 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
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..2fcda1a4ed010e0e7a8dc1bf51b4afedd66217bf 100644
--- a/ios/web/navigation/crw_session_controller.mm
+++ b/ios/web/navigation/crw_session_controller.mm
@@ -285,6 +285,10 @@ - (void)addPendingItem:(const GURL&)url
referrer:(const web::Referrer&)ref
transition:(ui::PageTransition)trans
initiationType:(web::NavigationInitiationType)initiationType {
+ // Server side redirects are handled by updating existing pending item instead
+ // of adding a new item.
+ DCHECK((trans & ui::PAGE_TRANSITION_SERVER_REDIRECT) == 0);
+
[self discardTransientItem];
self.pendingItemIndex = -1;
« no previous file with comments | « ios/chrome/browser/web/navigation_manager_util_unittest.mm ('k') | ios/web/navigation/crw_session_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698