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

Unified Diff: content/renderer/render_view_impl.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/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 96775e1c2a7fd19e724c65909e907fe97ad4a8de..c2943b1dbaf30f92a0b9129ed6b7e00b852a467d 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1384,21 +1384,19 @@ void RenderViewImpl::UpdateSessionHistory(WebFrame* frame) {
// there is no past session history to record.
if (page_id_ == -1)
return;
-
- WebHistoryItem item = history_controller_->GetPreviousItemForExport();
- SendUpdateState(item);
+ SendUpdateState(history_controller_->GetPreviousEntry());
}
-void RenderViewImpl::SendUpdateState(const WebHistoryItem& item) {
- if (item.isNull())
+void RenderViewImpl::SendUpdateState(HistoryEntry* entry) {
+ if (!entry)
return;
// Don't send state updates for kSwappedOutURL.
- if (item.urlString() == WebString::fromUTF8(kSwappedOutURL))
+ if (entry->root().urlString() == WebString::fromUTF8(kSwappedOutURL))
return;
Send(new ViewHostMsg_UpdateState(
- routing_id_, page_id_, HistoryItemToPageState(item)));
+ routing_id_, page_id_, HistoryEntryToPageState(entry)));
}
// WebViewDelegate ------------------------------------------------------------
@@ -2725,9 +2723,7 @@ void RenderViewImpl::PlayerGone(blink::WebMediaPlayer* player) {
void RenderViewImpl::SyncNavigationState() {
if (!webview())
return;
-
- WebHistoryItem item = history_controller_->GetCurrentItemForExport();
- SendUpdateState(item);
+ SendUpdateState(history_controller_->GetCurrentEntry());
}
GURL RenderViewImpl::GetLoadingUrl(blink::WebFrame* frame) const {

Powered by Google App Engine
This is Rietveld 408576698