OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/i18n/time_formatting.h" | 7 #include "base/i18n/time_formatting.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "chrome/browser/certificate_viewer.h" | 10 #include "chrome/browser/certificate_viewer.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 x509_certificate_model::GetCertChainFromCert(cert_->os_cert_handle(), | 62 x509_certificate_model::GetCertChainFromCert(cert_->os_cert_handle(), |
63 &cert_chain); | 63 &cert_chain); |
64 title_ = l10n_util::GetStringFUTF16(IDS_CERT_INFO_DIALOG_TITLE, | 64 title_ = l10n_util::GetStringFUTF16(IDS_CERT_INFO_DIALOG_TITLE, |
65 UTF8ToUTF16(x509_certificate_model::GetTitle(cert_chain.front()))); | 65 UTF8ToUTF16(x509_certificate_model::GetTitle(cert_chain.front()))); |
66 } | 66 } |
67 | 67 |
68 CertificateViewerDialog::~CertificateViewerDialog() { | 68 CertificateViewerDialog::~CertificateViewerDialog() { |
69 } | 69 } |
70 | 70 |
71 bool CertificateViewerDialog::IsDialogModal() const { | 71 bool CertificateViewerDialog::IsDialogModal() const { |
72 return true; | 72 return false; |
73 } | 73 } |
74 | 74 |
75 string16 CertificateViewerDialog::GetDialogTitle() const { | 75 string16 CertificateViewerDialog::GetDialogTitle() const { |
76 return title_; | 76 return title_; |
77 } | 77 } |
78 | 78 |
79 GURL CertificateViewerDialog::GetDialogContentURL() const { | 79 GURL CertificateViewerDialog::GetDialogContentURL() const { |
80 return GURL(chrome::kChromeUICertificateViewerURL); | 80 return GURL(chrome::kChromeUICertificateViewerURL); |
81 } | 81 } |
82 | 82 |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 cert_sub_fields->Append(node_details = new DictionaryValue()); | 396 cert_sub_fields->Append(node_details = new DictionaryValue()); |
397 node_details->SetString("label", | 397 node_details->SetString("label", |
398 l10n_util::GetStringUTF8(IDS_CERT_INFO_SHA1_FINGERPRINT_LABEL)); | 398 l10n_util::GetStringUTF8(IDS_CERT_INFO_SHA1_FINGERPRINT_LABEL)); |
399 node_details->SetString("payload.val", | 399 node_details->SetString("payload.val", |
400 x509_certificate_model::HashCertSHA1(cert)); | 400 x509_certificate_model::HashCertSHA1(cert)); |
401 | 401 |
402 // Send certificate information to javascript. | 402 // Send certificate information to javascript. |
403 web_ui_->CallJavascriptFunction("cert_viewer.getCertificateFields", | 403 web_ui_->CallJavascriptFunction("cert_viewer.getCertificateFields", |
404 root_list); | 404 root_list); |
405 } | 405 } |
OLD | NEW |