Chromium Code Reviews| Index: content/renderer/history_entry.cc |
| diff --git a/content/renderer/history_entry.cc b/content/renderer/history_entry.cc |
| index 8d168ee5d3a4df9e88d1ec3a1cecd3c308a741ff..4d19e453e7cd5ac13880cb4b11405f5b484b484d 100644 |
| --- a/content/renderer/history_entry.cc |
| +++ b/content/renderer/history_entry.cc |
| @@ -35,8 +35,6 @@ |
| #include "content/renderer/history_entry.h" |
| -#include <deque> |
| - |
| #include "content/renderer/render_frame_impl.h" |
| #include "content/renderer/render_view_impl.h" |
| #include "third_party/WebKit/public/web/WebFrame.h" |
| @@ -90,13 +88,19 @@ HistoryEntry::HistoryNode* HistoryEntry::HistoryNode::CloneAndReplace( |
| return new_history_node; |
| } |
| +void HistoryEntry::HistoryNode::set_item(const WebHistoryItem& item) { |
| + entry_->unique_names_to_items_[item.target().utf8()] = this; |
|
Nate Chapin
2014/04/25 21:49:21
When a HistoryNode is created during deserializati
Charlie Reis
2014/04/28 16:29:00
I'm not sure I follow this, but it also sounds lik
Nate Chapin
2014/04/28 17:31:54
Done.
|
| + item_ = item; |
| +} |
| + |
| HistoryEntry::HistoryNode::HistoryNode(HistoryEntry* entry, |
| const WebHistoryItem& item, |
| int64_t frame_id) |
| : entry_(entry), item_(item) { |
| if (frame_id != kInvalidFrameRoutingID) |
| entry_->frames_to_items_[frame_id] = this; |
| - entry_->unique_names_to_items_[item.target().utf8()] = this; |
| + if (!item.isNull()) |
| + entry_->unique_names_to_items_[item.target().utf8()] = this; |
| children_.reset(new ScopedVector<HistoryNode>); |
| } |