OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "grit/generated_resources.h" | 9 #include "chrome/grit/generated_resources.h" |
10 #include "jni/CertificateViewer_jni.h" | 10 #include "jni/CertificateViewer_jni.h" |
11 #include "net/cert/x509_certificate.h" | 11 #include "net/cert/x509_certificate.h" |
12 #include "ui/base/l10n/l10n_util.h" | 12 #include "ui/base/l10n/l10n_util.h" |
13 | 13 |
14 using base::android::ConvertUTF8ToJavaString; | 14 using base::android::ConvertUTF8ToJavaString; |
15 using base::android::ScopedJavaLocalRef; | 15 using base::android::ScopedJavaLocalRef; |
16 | 16 |
17 void ShowCertificateViewer(content::WebContents* web_contents, | 17 void ShowCertificateViewer(content::WebContents* web_contents, |
18 gfx::NativeWindow parent, | 18 gfx::NativeWindow parent, |
19 net::X509Certificate* cert) { | 19 net::X509Certificate* cert) { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 static jstring GetCertSHA1FingerprintText(JNIEnv* env, jclass) { | 84 static jstring GetCertSHA1FingerprintText(JNIEnv* env, jclass) { |
85 return ConvertUTF8ToJavaString( | 85 return ConvertUTF8ToJavaString( |
86 env, l10n_util::GetStringUTF8( | 86 env, l10n_util::GetStringUTF8( |
87 IDS_CERT_INFO_SHA1_FINGERPRINT_LABEL)).Release(); | 87 IDS_CERT_INFO_SHA1_FINGERPRINT_LABEL)).Release(); |
88 } | 88 } |
89 | 89 |
90 bool RegisterCertificateViewer(JNIEnv* env) { | 90 bool RegisterCertificateViewer(JNIEnv* env) { |
91 return RegisterNativesImpl(env); | 91 return RegisterNativesImpl(env); |
92 } | 92 } |
OLD | NEW |