Index: chrome/browser/chrome_content_browser_client.cc |
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
index 25f4aa462679cd10704c7256488f194bcad52df4..18621cb28adb15538553da8bc454ab2f3eb9e896 100644 |
--- a/chrome/browser/chrome_content_browser_client.cc |
+++ b/chrome/browser/chrome_content_browser_client.cc |
@@ -140,6 +140,7 @@ |
#include "net/cookies/canonical_cookie.h" |
#include "net/cookies/cookie_options.h" |
#include "net/ssl/ssl_cert_request_info.h" |
+#include "net/ssl/ssl_platform_key.h" |
#include "ppapi/host/ppapi_host.h" |
#include "storage/browser/fileapi/external_mount_points.h" |
#include "ui/base/l10n/l10n_util.h" |
@@ -435,6 +436,7 @@ bool HandleWebUIReverse(GURL* url, content::BrowserContext* browser_context) { |
return RemoveUberHost(url); |
} |
+#if !defined(OS_ANDROID) |
bool CertMatchesFilter(const net::X509Certificate& cert, |
const base::DictionaryValue& filter) { |
// TODO(markusheintz): This is the minimal required filter implementation. |
@@ -452,6 +454,7 @@ bool CertMatchesFilter(const net::X509Certificate& cert, |
} |
return false; |
} |
+#endif |
#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) |
breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( |
@@ -1968,6 +1971,7 @@ void ChromeContentBrowserClient::SelectClientCertificate( |
std::string(), |
NULL); |
davidben
2015/10/13 20:32:15
Probably add a comment to the #ifdef that Android
svaldez
2015/10/14 15:06:18
Done.
|
+#if !defined(OS_ANDROID) |
davidben
2015/10/13 20:32:15
Nit: Move this up to line 1958 I think.
svaldez
2015/10/14 15:06:18
Done.
|
if (filter.get()) { |
// Try to automatically select a client certificate. |
if (filter->IsType(base::Value::TYPE_DICTIONARY)) { |
@@ -1979,7 +1983,12 @@ void ChromeContentBrowserClient::SelectClientCertificate( |
for (size_t i = 0; i < all_client_certs.size(); ++i) { |
if (CertMatchesFilter(*all_client_certs[i].get(), *filter_dict)) { |
// Use the first certificate that is matched by the filter. |
- delegate->ContinueWithCertificate(all_client_certs[i].get()); |
+ // The following is not supported on Android since the client_certs |
+ // list |
+ // won't be populated. |
+ delegate->ContinueWithCertificate( |
+ all_client_certs[i].get(), |
+ FetchClientCertPrivateKey(all_client_certs[i].get()).get()); |
davidben
2015/10/13 20:32:15
net:: prefix. Ugh, I bet this is compiling because
svaldez
2015/10/14 15:06:18
Done.
|
return; |
} |
} |
@@ -1987,6 +1996,7 @@ void ChromeContentBrowserClient::SelectClientCertificate( |
NOTREACHED(); |
} |
} |
+#endif |
chrome::ShowSSLClientCertificateSelector(web_contents, cert_request_info, |
delegate.Pass()); |