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

Unified Diff: chrome/browser/prerender/prerender_contents.cc

Issue 7604002: Fix prerender history always having FINAL_STATUS_MAX on cancellation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add comment Created 9 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_contents.cc
===================================================================
--- chrome/browser/prerender/prerender_contents.cc (revision 95657)
+++ chrome/browser/prerender/prerender_contents.cc (working copy)
@@ -503,9 +503,6 @@
if (prerendering_has_been_cancelled_)
return;
- prerendering_has_been_cancelled_ = true;
- prerender_manager_->MoveEntryToPendingDelete(this);
-
if (child_id_ != -1 && route_id_ != -1) {
// Cancel the prerender in the PrerenderTracker. This is needed
// because destroy may be called directly from the UI thread without calling
@@ -524,6 +521,11 @@
}
set_final_status(final_status);
+ prerendering_has_been_cancelled_ = true;
+ // This has to be done after setting the final status, as it adds the
+ // prerender to the history.
+ prerender_manager_->MoveEntryToPendingDelete(this);
+
// We may destroy the PrerenderContents before we have initialized the
// RenderViewHost. Otherwise set the Observer's PrerenderContents to NULL to
// avoid any more messages being sent.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698