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

Unified Diff: content/renderer/render_view_impl.cc

Issue 9865010: Prevent state updates for kSwappedOutURL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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') | no next file » | 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 7cc0a21e7f5bb33127a0c42565d3e81f4a2b1e63..bf0380f89c969180a4affba552dcf704f7a68e31 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1376,9 +1376,17 @@ void RenderViewImpl::UpdateSessionHistory(WebFrame* frame) {
const WebHistoryItem& item =
webview()->mainFrame()->previousHistoryItem();
+ SendUpdateState(item);
+}
+
+void RenderViewImpl::SendUpdateState(const WebHistoryItem& item) {
if (item.isNull())
return;
+ // Don't send state updates for chrome::kSwappedOutURL.
+ if (item.urlString() == WebString::fromUTF8(chrome::kSwappedOutURL))
+ return;
+
Send(new ViewHostMsg_UpdateState(
routing_id_, page_id_, webkit_glue::HistoryItemToString(item)));
}
@@ -3652,11 +3660,7 @@ void RenderViewImpl::SyncNavigationState() {
return;
const WebHistoryItem& item = webview()->mainFrame()->currentHistoryItem();
- if (item.isNull())
- return;
-
- Send(new ViewHostMsg_UpdateState(
- routing_id_, page_id_, webkit_glue::HistoryItemToString(item)));
+ SendUpdateState(item);
}
void RenderViewImpl::SyncSelectionIfRequired() {
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698