| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/certificate_viewer.h" | 5 #include "chrome/browser/certificate_viewer.h" |
| 6 | 6 |
| 7 #include "chrome/browser/cert_store.h" | 7 #include "chrome/browser/cert_store.h" |
| 8 | 8 |
| 9 void ShowCertificateViewerByID(gfx::NativeWindow parent, int cert_id) { | 9 void ShowCertificateViewerByID(gfx::NativeWindow parent, int cert_id) { |
| 10 scoped_refptr<net::X509Certificate> cert; | 10 scoped_refptr<net::X509Certificate> cert; |
| 11 CertStore::GetSharedInstance()->RetrieveCert(cert_id, &cert); | 11 CertStore::GetInstance()->RetrieveCert(cert_id, &cert); |
| 12 if (!cert.get()) { | 12 if (!cert.get()) { |
| 13 // The certificate was not found. Could be that the renderer crashed before | 13 // The certificate was not found. Could be that the renderer crashed before |
| 14 // we displayed the page info. | 14 // we displayed the page info. |
| 15 return; | 15 return; |
| 16 } | 16 } |
| 17 ShowCertificateViewer(parent, cert); | 17 ShowCertificateViewer(parent, cert); |
| 18 } | 18 } |
| OLD | NEW |