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

Unified Diff: chrome/browser/ui/views/certificate_viewer_win.cc

Issue 1158043004: Prevent SSL certificate export from jamming the chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/certificate_viewer_win.cc
diff --git a/chrome/browser/ui/views/certificate_viewer_win.cc b/chrome/browser/ui/views/certificate_viewer_win.cc
index 2ae3675d42631d6a629962e468fce5e97e5ce9a2..b3c6dcb090c03372366601cc8408a88a8c2093ac 100644
--- a/chrome/browser/ui/views/certificate_viewer_win.cc
+++ b/chrome/browser/ui/views/certificate_viewer_win.cc
@@ -43,10 +43,16 @@ void ShowCertificateViewerImpl(content::WebContents* web_contents,
// while the the certificate dialog is open.
base::MessageLoop::ScopedNestableTaskAllower allow(
base::MessageLoop::current());
+
+ // Tell the message loop to only handle certain types of messages while the
+ // dialog is open to avoid bad things happening. See https://crbug.com/344012
+ // for details.
+ base::MessageLoop::current()->set_os_modal_loop(true);
// This next call blocks but keeps processing windows messages, making it
// modal to the browser window.
::CryptUIDlgViewCertificate(&view_info, &properties_changed);
+ base::MessageLoop::current()->set_os_modal_loop(false);
CertFreeCertificateContext(cert_list);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698