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

Unified Diff: content/renderer/history_entry.cc

Issue 248013003: Remove WebHistoryItem child usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
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>);
}

Powered by Google App Engine
This is Rietveld 408576698