Chromium Code Reviews| Index: chrome/browser/ui/views/certificate_selector.cc |
| diff --git a/chrome/browser/ui/views/certificate_selector.cc b/chrome/browser/ui/views/certificate_selector.cc |
| index f6cb4f7443b5f3bc19a98e229ecbb41e7786803f..bd9e5d5241aa325e37eb790b5325e333f3b62705 100644 |
| --- a/chrome/browser/ui/views/certificate_selector.cc |
| +++ b/chrome/browser/ui/views/certificate_selector.cc |
| @@ -178,6 +178,18 @@ bool CertificateSelector::CanShow(content::WebContents* web_contents) { |
| void CertificateSelector::Show() { |
| constrained_window::ShowWebModalDialogViews(this, web_contents_); |
| + // TODO(isandrk): A certificate that was previously provided by *both* the |
|
msw
2016/08/29 17:08:29
What exactly is the TODO here? Will you try to fix
Ivan Šandrk
2016/08/30 14:23:22
So this is just a quick fix for the crash, the act
|
| + // platform and an extension will get incorrectly filtered out if the |
| + // extension stops providing it (both instances will be filtered out), hence |
| + // the certificates_ array will be empty. Displaying a dialog with an empty |
|
msw
2016/08/29 17:08:29
nit: |certificates_|
Ivan Šandrk
2016/08/30 14:23:22
Done.
|
| + // list won't make much sense for the user, and also there are some CHECKs in |
| + // the code that will fail when the list is empty and that's why an early exit |
| + // is performed here. See crbug.com/641440 for more details. |
|
msw
2016/08/29 17:08:29
nit: fix indent.
Ivan Šandrk
2016/08/30 14:23:23
Done.
|
| + if (certificates_.empty()) { |
| + GetWidget()->Close(); |
|
msw
2016/08/29 17:08:28
How is this dialog triggered? If the user clicks a
Ivan Šandrk
2016/08/30 14:23:22
Chrome network stack requests the dialog to be ope
|
| + return; |
| + } |
| + |
| // Select the first row automatically. This must be done after the dialog has |
| // been created. |
| table_->Select(0); |