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

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: moar comments 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
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index e66d313516fc459028f61da83cb9b3cf9212fe5c..e87990670b8c47c36ae2c764dfd71d8ecd1de705 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1385,21 +1385,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 ------------------------------------------------------------
@@ -2719,9 +2717,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 {
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698