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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 109983006: Remove calls of PrerenderTracker::TryCancel on UI thread and instead have them call PrerenderConten… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync 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
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
===================================================================
--- chrome/browser/chrome_content_browser_client.cc (revision 243063)
+++ chrome/browser/chrome_content_browser_client.cc (working copy)
@@ -1781,18 +1781,13 @@
NOTREACHED();
return;
}
- prerender::PrerenderManager* prerender_manager =
- prerender::PrerenderManagerFactory::GetForProfile(
- Profile::FromBrowserContext(tab->GetBrowserContext()));
- if (prerender_manager && prerender_manager->IsWebContentsPrerendering(tab,
- NULL)) {
- if (prerender_manager->prerender_tracker()->TryCancel(
- render_process_id,
- render_frame_host->GetRenderViewHost()->GetRoutingID(),
- prerender::FINAL_STATUS_SSL_ERROR)) {
- *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
- return;
- }
+
+ prerender::PrerenderContents* prerender_contents =
+ prerender::PrerenderContents::FromWebContents(tab);
+ if (prerender_contents) {
+ prerender_contents->Destroy(prerender::FINAL_STATUS_SSL_ERROR);
+ *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
+ return;
}
#if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698