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

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

Issue 596873002: Remove SSLClientAuthHandler's RDH dependency. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Further fix compile Created 6 years, 2 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
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 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after
1718 if (expired_previous_decision) 1718 if (expired_previous_decision)
1719 options_mask = SSLBlockingPage::EXPIRED_BUT_PREVIOUSLY_ALLOWED; 1719 options_mask = SSLBlockingPage::EXPIRED_BUT_PREVIOUSLY_ALLOWED;
1720 SSLBlockingPage* ssl_blocking_page = new SSLBlockingPage( 1720 SSLBlockingPage* ssl_blocking_page = new SSLBlockingPage(
1721 tab, cert_error, ssl_info, request_url, options_mask, callback); 1721 tab, cert_error, ssl_info, request_url, options_mask, callback);
1722 ssl_blocking_page->Show(); 1722 ssl_blocking_page->Show();
1723 } 1723 }
1724 1724
1725 void ChromeContentBrowserClient::SelectClientCertificate( 1725 void ChromeContentBrowserClient::SelectClientCertificate(
1726 int render_process_id, 1726 int render_process_id,
1727 int render_frame_id, 1727 int render_frame_id,
1728 const net::HttpNetworkSession* network_session,
1729 net::SSLCertRequestInfo* cert_request_info, 1728 net::SSLCertRequestInfo* cert_request_info,
1730 const base::Callback<void(net::X509Certificate*)>& callback) { 1729 const base::Callback<void(net::X509Certificate*)>& callback) {
1731 content::RenderFrameHost* rfh = content::RenderFrameHost::FromID( 1730 content::RenderFrameHost* rfh = content::RenderFrameHost::FromID(
1732 render_process_id, render_frame_id); 1731 render_process_id, render_frame_id);
1733 WebContents* tab = WebContents::FromRenderFrameHost(rfh); 1732 WebContents* tab = WebContents::FromRenderFrameHost(rfh);
1734 if (!tab) { 1733 if (!tab) {
1735 NOTREACHED(); 1734 callback.Run(NULL);
davidben 2014/09/23 22:57:24 Removed this NOTREACHED because it's not NOTREACHE
1736 return; 1735 return;
1737 } 1736 }
1738 1737
1739 prerender::PrerenderContents* prerender_contents = 1738 prerender::PrerenderContents* prerender_contents =
1740 prerender::PrerenderContents::FromWebContents(tab); 1739 prerender::PrerenderContents::FromWebContents(tab);
1741 if (prerender_contents) { 1740 if (prerender_contents) {
1742 prerender_contents->Destroy( 1741 prerender_contents->Destroy(
1743 prerender::FINAL_STATUS_SSL_CLIENT_CERTIFICATE_REQUESTED); 1742 prerender::FINAL_STATUS_SSL_CLIENT_CERTIFICATE_REQUESTED);
1743 callback.Run(NULL);
1744 return; 1744 return;
1745 } 1745 }
1746 1746
1747 GURL requesting_url("https://" + cert_request_info->host_and_port.ToString()); 1747 GURL requesting_url("https://" + cert_request_info->host_and_port.ToString());
1748 DCHECK(requesting_url.is_valid()) 1748 DCHECK(requesting_url.is_valid())
1749 << "Invalid URL string: https://" 1749 << "Invalid URL string: https://"
1750 << cert_request_info->host_and_port.ToString(); 1750 << cert_request_info->host_and_port.ToString();
1751 1751
1752 Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext()); 1752 Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext());
1753 scoped_ptr<base::Value> filter = 1753 scoped_ptr<base::Value> filter =
(...skipping 17 matching lines...) Expand all
1771 // Use the first certificate that is matched by the filter. 1771 // Use the first certificate that is matched by the filter.
1772 callback.Run(all_client_certs[i].get()); 1772 callback.Run(all_client_certs[i].get());
1773 return; 1773 return;
1774 } 1774 }
1775 } 1775 }
1776 } else { 1776 } else {
1777 NOTREACHED(); 1777 NOTREACHED();
1778 } 1778 }
1779 } 1779 }
1780 1780
1781 chrome::ShowSSLClientCertificateSelector(tab, network_session, 1781 chrome::ShowSSLClientCertificateSelector(tab, cert_request_info, callback);
1782 cert_request_info, callback);
1783 } 1782 }
1784 1783
1785 void ChromeContentBrowserClient::AddCertificate( 1784 void ChromeContentBrowserClient::AddCertificate(
1786 net::CertificateMimeType cert_type, 1785 net::CertificateMimeType cert_type,
1787 const void* cert_data, 1786 const void* cert_data,
1788 size_t cert_size, 1787 size_t cert_size,
1789 int render_process_id, 1788 int render_process_id,
1790 int render_frame_id) { 1789 int render_frame_id) {
1791 chrome::SSLAddCertificate(cert_type, cert_data, cert_size, 1790 chrome::SSLAddCertificate(cert_type, cert_data, cert_size,
1792 render_process_id, render_frame_id); 1791 render_process_id, render_frame_id);
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
2593 switches::kDisableWebRtcEncryption, 2592 switches::kDisableWebRtcEncryption,
2594 }; 2593 };
2595 to_command_line->CopySwitchesFrom(from_command_line, 2594 to_command_line->CopySwitchesFrom(from_command_line,
2596 kWebRtcDevSwitchNames, 2595 kWebRtcDevSwitchNames,
2597 arraysize(kWebRtcDevSwitchNames)); 2596 arraysize(kWebRtcDevSwitchNames));
2598 } 2597 }
2599 } 2598 }
2600 #endif // defined(ENABLE_WEBRTC) 2599 #endif // defined(ENABLE_WEBRTC)
2601 2600
2602 } // namespace chrome 2601 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/ssl/ssl_client_auth_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698