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

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

Issue 2808353007: Remove invalid DCHECK in [CRWSessionController addPendingItem]. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | 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/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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 DCHECK(!_navigationManager || 280 DCHECK(!_navigationManager ||
281 _navigationManager->GetBrowserState() == _browserState); 281 _navigationManager->GetBrowserState() == _browserState);
282 } 282 }
283 283
284 - (void)addPendingItem:(const GURL&)url 284 - (void)addPendingItem:(const GURL&)url
285 referrer:(const web::Referrer&)ref 285 referrer:(const web::Referrer&)ref
286 transition:(ui::PageTransition)trans 286 transition:(ui::PageTransition)trans
287 initiationType:(web::NavigationInitiationType)initiationType 287 initiationType:(web::NavigationInitiationType)initiationType
288 userAgentOverrideOption:(web::NavigationManager::UserAgentOverrideOption) 288 userAgentOverrideOption:(web::NavigationManager::UserAgentOverrideOption)
289 userAgentOverrideOption { 289 userAgentOverrideOption {
290 // Server side redirects are handled by updating existing pending item instead
291 // of adding a new item.
292 DCHECK((trans & ui::PAGE_TRANSITION_SERVER_REDIRECT) == 0);
293
294 [self discardTransientItem]; 290 [self discardTransientItem];
295 self.pendingItemIndex = -1; 291 self.pendingItemIndex = -1;
296 292
297 if (![self shouldCreatePendingItemWithURL:url 293 if (![self shouldCreatePendingItemWithURL:url
298 transition:trans 294 transition:trans
299 userAgentOverrideOption:userAgentOverrideOption]) { 295 userAgentOverrideOption:userAgentOverrideOption]) {
300 return; 296 return;
301 } 297 }
302 298
303 _pendingItem = [self itemWithURL:url 299 _pendingItem = [self itemWithURL:url
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 return item; 652 return item;
657 } 653 }
658 654
659 - (BOOL)isRedirectTransitionForItemAtIndex:(size_t)index { 655 - (BOOL)isRedirectTransitionForItemAtIndex:(size_t)index {
660 DCHECK_LT(index, self.items.size()); 656 DCHECK_LT(index, self.items.size());
661 ui::PageTransition transition = self.items[index]->GetTransitionType(); 657 ui::PageTransition transition = self.items[index]->GetTransitionType();
662 return (transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK) ? YES : NO; 658 return (transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK) ? YES : NO;
663 } 659 }
664 660
665 @end 661 @end
OLDNEW
« 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