OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
849 SSLClientAuthHandler* handler) { | 849 SSLClientAuthHandler* handler) { |
850 TabContents* tab = tab_util::GetTabContentsByID( | 850 TabContents* tab = tab_util::GetTabContentsByID( |
851 render_process_id, render_view_id); | 851 render_process_id, render_view_id); |
852 if (!tab) { | 852 if (!tab) { |
853 NOTREACHED(); | 853 NOTREACHED(); |
854 return; | 854 return; |
855 } | 855 } |
856 | 856 |
857 TabContentsWrapper* wrapper = | 857 TabContentsWrapper* wrapper = |
858 TabContentsWrapper::GetCurrentWrapperForContents(tab); | 858 TabContentsWrapper::GetCurrentWrapperForContents(tab); |
859 wrapper->ssl_helper()->SelectClientCertificate(handler); | 859 if (wrapper) { |
Mattias Nissler (ping if slow)
2011/11/30 19:56:16
no need for curlies here.
markusheintz_
2011/12/02 14:54:20
I think the style guide is ok with that if you hav
markusheintz_
2011/12/02 14:54:20
I guess the style quide is fine with that.
| |
860 wrapper->ssl_helper()->SelectClientCertificate(handler); | |
861 } else { | |
862 handler->CertificateSelected(NULL); | |
wtc
2011/11/30 23:59:43
It seems that what we do in this case should match
markusheintz_
2011/12/02 14:54:20
What happens to the request if we don't call Certi
| |
863 } | |
860 } | 864 } |
861 | 865 |
862 void ChromeContentBrowserClient::AddNewCertificate( | 866 void ChromeContentBrowserClient::AddNewCertificate( |
863 net::URLRequest* request, | 867 net::URLRequest* request, |
864 net::X509Certificate* cert, | 868 net::X509Certificate* cert, |
865 int render_process_id, | 869 int render_process_id, |
866 int render_view_id) { | 870 int render_view_id) { |
867 // The handler will run the UI and delete itself when it's finished. | 871 // The handler will run the UI and delete itself when it's finished. |
868 new SSLAddCertHandler(request, cert, render_process_id, render_view_id); | 872 new SSLAddCertHandler(request, cert, render_process_id, render_view_id); |
869 } | 873 } |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1109 #if defined(USE_NSS) | 1113 #if defined(USE_NSS) |
1110 crypto::CryptoModuleBlockingPasswordDelegate* | 1114 crypto::CryptoModuleBlockingPasswordDelegate* |
1111 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1115 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
1112 const GURL& url) { | 1116 const GURL& url) { |
1113 return browser::NewCryptoModuleBlockingDialogDelegate( | 1117 return browser::NewCryptoModuleBlockingDialogDelegate( |
1114 browser::kCryptoModulePasswordKeygen, url.host()); | 1118 browser::kCryptoModulePasswordKeygen, url.host()); |
1115 } | 1119 } |
1116 #endif | 1120 #endif |
1117 | 1121 |
1118 } // namespace chrome | 1122 } // namespace chrome |
OLD | NEW |