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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after
1774 content::RenderFrameHost::FromID(render_process_id, render_frame_id); 1774 content::RenderFrameHost::FromID(render_process_id, render_frame_id);
1775 if (!render_frame_host) { 1775 if (!render_frame_host) {
1776 NOTREACHED(); 1776 NOTREACHED();
1777 return; 1777 return;
1778 } 1778 }
1779 WebContents* tab = WebContents::FromRenderFrameHost(render_frame_host); 1779 WebContents* tab = WebContents::FromRenderFrameHost(render_frame_host);
1780 if (!tab) { 1780 if (!tab) {
1781 NOTREACHED(); 1781 NOTREACHED();
1782 return; 1782 return;
1783 } 1783 }
1784 prerender::PrerenderManager* prerender_manager = 1784
1785 prerender::PrerenderManagerFactory::GetForProfile( 1785 prerender::PrerenderContents* prerender_contents =
1786 Profile::FromBrowserContext(tab->GetBrowserContext())); 1786 prerender::PrerenderContents::FromWebContents(tab);
1787 if (prerender_manager && prerender_manager->IsWebContentsPrerendering(tab, 1787 if (prerender_contents) {
1788 NULL)) { 1788 prerender_contents->Destroy(prerender::FINAL_STATUS_SSL_ERROR);
1789 if (prerender_manager->prerender_tracker()->TryCancel( 1789 *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
1790 render_process_id, 1790 return;
1791 render_frame_host->GetRenderViewHost()->GetRoutingID(),
1792 prerender::FINAL_STATUS_SSL_ERROR)) {
1793 *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
1794 return;
1795 }
1796 } 1791 }
1797 1792
1798 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 1793 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
1799 captive_portal::CaptivePortalTabHelper* captive_portal_tab_helper = 1794 captive_portal::CaptivePortalTabHelper* captive_portal_tab_helper =
1800 captive_portal::CaptivePortalTabHelper::FromWebContents(tab); 1795 captive_portal::CaptivePortalTabHelper::FromWebContents(tab);
1801 if (captive_portal_tab_helper) 1796 if (captive_portal_tab_helper)
1802 captive_portal_tab_helper->OnSSLCertError(ssl_info); 1797 captive_portal_tab_helper->OnSSLCertError(ssl_info);
1803 #endif 1798 #endif
1804 1799
1805 // Otherwise, display an SSL blocking page. 1800 // Otherwise, display an SSL blocking page.
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
2657 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on 2652 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on
2658 // Chromium builds as well. 2653 // Chromium builds as well.
2659 return channel <= chrome::VersionInfo::CHANNEL_DEV; 2654 return channel <= chrome::VersionInfo::CHANNEL_DEV;
2660 #else 2655 #else
2661 return false; 2656 return false;
2662 #endif 2657 #endif
2663 } 2658 }
2664 2659
2665 2660
2666 } // namespace chrome 2661 } // namespace chrome
OLDNEW
« 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