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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 124113003: Remove calls of PrerenderTracker::TryCancel and TryCancelOnIOThread in ChromeResourceDispatcherHost… (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 unified diff | Download patch | Annotate | Revision Log
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 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after
1808 } 1808 }
1809 1809
1810 void ChromeContentBrowserClient::SelectClientCertificate( 1810 void ChromeContentBrowserClient::SelectClientCertificate(
1811 int render_process_id, 1811 int render_process_id,
1812 int render_frame_id, 1812 int render_frame_id,
1813 const net::HttpNetworkSession* network_session, 1813 const net::HttpNetworkSession* network_session,
1814 net::SSLCertRequestInfo* cert_request_info, 1814 net::SSLCertRequestInfo* cert_request_info,
1815 const base::Callback<void(net::X509Certificate*)>& callback) { 1815 const base::Callback<void(net::X509Certificate*)>& callback) {
1816 content::RenderFrameHost* rfh = content::RenderFrameHost::FromID( 1816 content::RenderFrameHost* rfh = content::RenderFrameHost::FromID(
1817 render_process_id, render_frame_id); 1817 render_process_id, render_frame_id);
1818 if (!rfh) {
jam 2014/01/03 23:22:10 this is unnecessary since WebContents::FromRenderF
1819 NOTREACHED();
1820 return;
1821 }
1822
1823 WebContents* tab = WebContents::FromRenderFrameHost(rfh); 1818 WebContents* tab = WebContents::FromRenderFrameHost(rfh);
1824 if (!tab) { 1819 if (!tab) {
1825 NOTREACHED(); 1820 NOTREACHED();
1826 return; 1821 return;
1827 } 1822 }
1828 1823
1824 prerender::PrerenderManager* prerender_manager =
1825 prerender::PrerenderManagerFactory::GetForProfile(
1826 Profile::FromBrowserContext(tab->GetBrowserContext()));
1827 if (prerender_manager) {
1828 prerender::PrerenderContents* prerender_contents =
1829 prerender_manager->GetPrerenderContents(tab);
1830 if (prerender_contents) {
1831 prerender_contents->Destroy(
1832 prerender::FINAL_STATUS_SSL_CLIENT_CERTIFICATE_REQUESTED);
1833 return;
1834 }
1835 }
1836
1829 GURL requesting_url("https://" + cert_request_info->host_and_port.ToString()); 1837 GURL requesting_url("https://" + cert_request_info->host_and_port.ToString());
1830 DCHECK(requesting_url.is_valid()) 1838 DCHECK(requesting_url.is_valid())
1831 << "Invalid URL string: https://" 1839 << "Invalid URL string: https://"
1832 << cert_request_info->host_and_port.ToString(); 1840 << cert_request_info->host_and_port.ToString();
1833 1841
1834 Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext()); 1842 Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext());
1835 scoped_ptr<base::Value> filter( 1843 scoped_ptr<base::Value> filter(
1836 profile->GetHostContentSettingsMap()->GetWebsiteSetting( 1844 profile->GetHostContentSettingsMap()->GetWebsiteSetting(
1837 requesting_url, 1845 requesting_url,
1838 requesting_url, 1846 requesting_url,
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
2656 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on 2664 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on
2657 // Chromium builds as well. 2665 // Chromium builds as well.
2658 return channel <= chrome::VersionInfo::CHANNEL_DEV; 2666 return channel <= chrome::VersionInfo::CHANNEL_DEV;
2659 #else 2667 #else
2660 return false; 2668 return false;
2661 #endif 2669 #endif
2662 } 2670 }
2663 2671
2664 2672
2665 } // namespace chrome 2673 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698