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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 } | 537 } |
538 | 538 |
539 - (void)updateCurrentEntryWithURL:(const GURL&)url | 539 - (void)updateCurrentEntryWithURL:(const GURL&)url |
540 stateObject:(NSString*)stateObject { | 540 stateObject:(NSString*)stateObject { |
541 DCHECK(!_transientEntry); | 541 DCHECK(!_transientEntry); |
542 CRWSessionEntry* currentEntry = self.currentEntry; | 542 CRWSessionEntry* currentEntry = self.currentEntry; |
543 web::NavigationItemImpl* currentItem = self.currentEntry.navigationItemImpl; | 543 web::NavigationItemImpl* currentItem = self.currentEntry.navigationItemImpl; |
544 currentItem->SetURL(url); | 544 currentItem->SetURL(url); |
545 currentItem->SetSerializedStateObject(stateObject); | 545 currentItem->SetSerializedStateObject(stateObject); |
546 currentItem->SetHasStateBeenReplaced(true); | 546 currentItem->SetHasStateBeenReplaced(true); |
| 547 currentItem->SetPostData(nil); |
547 currentEntry.navigationItem->SetURL(url); | 548 currentEntry.navigationItem->SetURL(url); |
548 // If the change is to a committed entry, notify interested parties. | 549 // If the change is to a committed entry, notify interested parties. |
549 if (currentEntry != self.pendingEntry && _navigationManager) | 550 if (currentEntry != self.pendingEntry && _navigationManager) |
550 _navigationManager->OnNavigationItemChanged(); | 551 _navigationManager->OnNavigationItemChanged(); |
551 } | 552 } |
552 | 553 |
553 - (void)discardNonCommittedEntries { | 554 - (void)discardNonCommittedEntries { |
554 [self discardTransientEntry]; | 555 [self discardTransientEntry]; |
555 _pendingEntry.reset(); | 556 _pendingEntry.reset(); |
556 _pendingEntryIndex = -1; | 557 _pendingEntryIndex = -1; |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 return [[CRWSessionEntry alloc] initWithNavigationItem:std::move(item)]; | 743 return [[CRWSessionEntry alloc] initWithNavigationItem:std::move(item)]; |
743 } | 744 } |
744 | 745 |
745 - (BOOL)isRedirectTransitionForEntryAtIndex:(NSInteger)index { | 746 - (BOOL)isRedirectTransitionForEntryAtIndex:(NSInteger)index { |
746 ui::PageTransition transition = | 747 ui::PageTransition transition = |
747 [_entries[index] navigationItem]->GetTransitionType(); | 748 [_entries[index] navigationItem]->GetTransitionType(); |
748 return (transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK) ? YES : NO; | 749 return (transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK) ? YES : NO; |
749 } | 750 } |
750 | 751 |
751 @end | 752 @end |
OLD | NEW |