| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 /* | 5 /* |
| 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * | 10 * |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 break; | 172 break; |
| 173 case blink::WebInitialCommitInChildFrame: | 173 case blink::WebInitialCommitInChildFrame: |
| 174 UpdateForInitialLoadInChildFrame(frame, item); | 174 UpdateForInitialLoadInChildFrame(frame, item); |
| 175 break; | 175 break; |
| 176 case blink::WebHistoryInertCommit: | 176 case blink::WebHistoryInertCommit: |
| 177 // Even for inert commits (e.g., location.replace, client redirects), make | 177 // Even for inert commits (e.g., location.replace, client redirects), make |
| 178 // sure the current entry gets updated, if there is one. | 178 // sure the current entry gets updated, if there is one. |
| 179 if (current_entry_) { | 179 if (current_entry_) { |
| 180 if (HistoryEntry::HistoryNode* node = | 180 if (HistoryEntry::HistoryNode* node = |
| 181 current_entry_->GetHistoryNodeForFrame(frame)) { | 181 current_entry_->GetHistoryNodeForFrame(frame)) { |
| 182 if (!navigation_within_page) |
| 183 node->RemoveChildren(); |
| 182 node->set_item(item); | 184 node->set_item(item); |
| 183 } | 185 } |
| 184 } | 186 } |
| 185 break; | 187 break; |
| 186 default: | 188 default: |
| 187 NOTREACHED() << "Invalid commit type: " << commit_type; | 189 NOTREACHED() << "Invalid commit type: " << commit_type; |
| 188 } | 190 } |
| 189 } | 191 } |
| 190 | 192 |
| 191 HistoryEntry* HistoryController::GetCurrentEntry() { | 193 HistoryEntry* HistoryController::GetCurrentEntry() { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 219 if (!current_entry_) { | 221 if (!current_entry_) { |
| 220 current_entry_.reset( | 222 current_entry_.reset( |
| 221 new HistoryEntry(new_item, target_frame->GetRoutingID())); | 223 new HistoryEntry(new_item, target_frame->GetRoutingID())); |
| 222 } else { | 224 } else { |
| 223 current_entry_.reset(current_entry_->CloneAndReplace( | 225 current_entry_.reset(current_entry_->CloneAndReplace( |
| 224 new_item, clone_children_of_target, target_frame, render_view_)); | 226 new_item, clone_children_of_target, target_frame, render_view_)); |
| 225 } | 227 } |
| 226 } | 228 } |
| 227 | 229 |
| 228 } // namespace content | 230 } // namespace content |
| OLD | NEW |