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

Unified Diff: content/renderer/render_view_impl.cc

Issue 9969072: Merge 129306 - Prevent state updates for kSwappedOutURL. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/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
===================================================================
--- content/renderer/render_view_impl.cc (revision 130205)
+++ content/renderer/render_view_impl.cc (working copy)
@@ -1288,9 +1288,17 @@
const WebHistoryItem& item =
webview()->mainFrame()->previousHistoryItem();
+ SendUpdateState(item);
+}
+
+void RenderViewImpl::SendUpdateState(const WebHistoryItem& item) {
if (item.isNull())
return;
+ // Don't send state updates for about:swappedout.
+ if (item.urlString() == WebString::fromUTF8("about:swappedout"))
+ return;
+
Send(new ViewHostMsg_UpdateState(
routing_id_, page_id_, webkit_glue::HistoryItemToString(item)));
}
@@ -3509,11 +3517,7 @@
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