| OLD | NEW |
| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 } | 323 } |
| 324 } | 324 } |
| 325 | 325 |
| 326 _pendingItem = [self itemWithURL:url | 326 _pendingItem = [self itemWithURL:url |
| 327 referrer:ref | 327 referrer:ref |
| 328 transition:trans | 328 transition:trans |
| 329 initiationType:initiationType]; | 329 initiationType:initiationType]; |
| 330 | 330 |
| 331 if (_navigationManager && _navigationManager->GetFacadeDelegate()) | 331 if (_navigationManager && _navigationManager->GetFacadeDelegate()) |
| 332 _navigationManager->GetFacadeDelegate()->OnNavigationItemPending(); | 332 _navigationManager->GetFacadeDelegate()->OnNavigationItemPending(); |
| 333 DCHECK_EQ(-1, self.pendingItemIndex); |
| 333 } | 334 } |
| 334 | 335 |
| 335 - (void)updatePendingItem:(const GURL&)url { | 336 - (void)updatePendingItem:(const GURL&)url { |
| 336 // If there is no pending item, navigation is probably happening within the | 337 // If there is no pending item, navigation is probably happening within the |
| 337 // session history. Don't modify the item list. | 338 // session history. Don't modify the item list. |
| 338 web::NavigationItemImpl* item = self.pendingItem; | 339 web::NavigationItemImpl* item = self.pendingItem; |
| 339 if (!item) | 340 if (!item) |
| 340 return; | 341 return; |
| 341 | 342 |
| 342 if (url != item->GetURL()) { | 343 if (url != item->GetURL()) { |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 return item; | 626 return item; |
| 626 } | 627 } |
| 627 | 628 |
| 628 - (BOOL)isRedirectTransitionForItemAtIndex:(size_t)index { | 629 - (BOOL)isRedirectTransitionForItemAtIndex:(size_t)index { |
| 629 DCHECK_LT(index, self.items.size()); | 630 DCHECK_LT(index, self.items.size()); |
| 630 ui::PageTransition transition = self.items[index]->GetTransitionType(); | 631 ui::PageTransition transition = self.items[index]->GetTransitionType(); |
| 631 return (transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK) ? YES : NO; | 632 return (transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK) ? YES : NO; |
| 632 } | 633 } |
| 633 | 634 |
| 634 @end | 635 @end |
| OLD | NEW |