Give names to all utility processes.
[chromium-blink-merge.git] / chrome / browser / certificate_viewer.cc
blob4c2c6e6385f4e0987fff99b970f608c81928933e
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
3 // found in the LICENSE file.
5 #include "chrome/browser/certificate_viewer.h"
7 #include "content/public/browser/cert_store.h"
8 #include "net/cert/x509_certificate.h"
10 void ShowCertificateViewerByID(content::WebContents* web_contents,
11 gfx::NativeWindow parent,
12 int cert_id) {
13 scoped_refptr<net::X509Certificate> cert;
14 content::CertStore::GetInstance()->RetrieveCert(cert_id, &cert);
15 if (!cert.get()) {
16 // The certificate was not found. Could be that the renderer crashed before
17 // we displayed the page info.
18 return;
20 ShowCertificateViewer(web_contents, parent, cert.get());