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

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

Issue 138583003: Add back the code to PrerenderManager::PendingSwap to handle RenderViewCreated being called for a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 11 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: chrome/browser/prerender/prerender_tracker.cc
===================================================================
--- chrome/browser/prerender/prerender_tracker.cc (revision 244941)
+++ chrome/browser/prerender/prerender_tracker.cc (working copy)
@@ -118,7 +118,7 @@
DCHECK(it != pending_swap_throttle_map_.end());
if (it == pending_swap_throttle_map_.end())
return;
- it->second.throttle = throttle;
+ it->second.throttles.push_back(throttle);
}
void PrerenderTracker::AddPrerenderOnIOThread(
@@ -173,11 +173,13 @@
pending_swap_throttle_map_.find(render_frame_route_id_pair);
DCHECK(it != pending_swap_throttle_map_.end());
// Cancel or resume all throttled resources.
- if (it->second.throttle) {
+ for (size_t i = 0; i < it->second.throttles.size(); i++) {
+ if (!it->second.throttles[i])
+ continue;
if (swap_successful)
- it->second.throttle->Cancel();
+ it->second.throttles[i]->Cancel();
else
- it->second.throttle->Resume();
+ it->second.throttles[i]->Resume();
}
pending_swap_throttle_map_.erase(render_frame_route_id_pair);
}

Powered by Google App Engine
This is Rietveld 408576698