From 5d64a4697775ffcc7d4524bef5da775e7f3c11f7 Mon Sep 17 00:00:00 2001 From: Robert Liao Date: Tue, 24 Jul 2018 20:48:06 +0000 Subject: [PATCH] Use the Native Certificate Viewer on MacOS even on MacViews BUG=766926 Change-Id: I6d0302763687bbb4fe30682684ad85a2ac79f782 Reviewed-on: https://chromium-review.googlesource.com/1145674 Reviewed-by: Elly Fong-Jones Commit-Queue: Robert Liao Cr-Original-Commit-Position: refs/heads/master@{#577201}(cherry picked from commit 7fbbd5f29e26ea66c2a154bbcc97707574dac518) Reviewed-on: https://chromium-review.googlesource.com/1148610 Reviewed-by: Robert Liao Cr-Commit-Position: refs/branch-heads/3497@{#51} Cr-Branched-From: 271eaf50594eb818c9295dc78d364aea18c82ea8-refs/heads/master@{#576753} --- .../ui/views/ssl_client_certificate_selector.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/chrome/browser/ui/views/ssl_client_certificate_selector.cc b/chrome/browser/ui/views/ssl_client_certificate_selector.cc index d73a0651fdc2..00b435fcec78 100644 --- a/chrome/browser/ui/views/ssl_client_certificate_selector.cc +++ b/chrome/browser/ui/views/ssl_client_certificate_selector.cc @@ -142,14 +142,11 @@ void ShowSSLClientCertificateSelector( net::ClientCertIdentityList client_certs, std::unique_ptr delegate) { #if defined(OS_MACOSX) - // TODO(ellyjones): Always use the Cocoa cert selector, even in Views builds. - // See also https://crbug.com/804950. - if (views_mode_controller::IsViewsBrowserCocoa()) { - return ShowSSLClientCertificateSelectorCocoa(contents, cert_request_info, - std::move(client_certs), - std::move(delegate)); - } -#endif + return ShowSSLClientCertificateSelectorCocoa(contents, cert_request_info, + std::move(client_certs), + std::move(delegate)); +#else // defined(OS_MACOSX) + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); // Not all WebContentses can show modal dialogs. @@ -164,6 +161,7 @@ void ShowSSLClientCertificateSelector( std::move(delegate)); selector->Init(); selector->Show(); +#endif // defined(OS_MACOSX) } } // namespace chrome