Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(612)

Side by Side Diff: chrome/browser/ui/android/page_info/connection_info_popup_android.cc

Issue 2567673002: Factor getCertificateChain out of ConnectionPopupInfo (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ui/android/page_info/connection_info_popup_android.h" 5 #include "chrome/browser/ui/android/page_info/connection_info_popup_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "chrome/browser/android/resource_mapper.h" 10 #include "chrome/browser/android/resource_mapper.h"
(...skipping 16 matching lines...) Expand all
27 using base::android::CheckException; 27 using base::android::CheckException;
28 using base::android::ConvertUTF8ToJavaString; 28 using base::android::ConvertUTF8ToJavaString;
29 using base::android::ConvertUTF16ToJavaString; 29 using base::android::ConvertUTF16ToJavaString;
30 using base::android::GetClass; 30 using base::android::GetClass;
31 using base::android::JavaParamRef; 31 using base::android::JavaParamRef;
32 using base::android::ScopedJavaLocalRef; 32 using base::android::ScopedJavaLocalRef;
33 using content::WebContents; 33 using content::WebContents;
34 34
35 static ScopedJavaLocalRef<jobjectArray> GetCertificateChain( 35 static ScopedJavaLocalRef<jobjectArray> GetCertificateChain(
36 JNIEnv* env, 36 JNIEnv* env,
37 const JavaParamRef<jobject>& obj, 37 const JavaParamRef<jclass>&,
38 const JavaParamRef<jobject>& java_web_contents) { 38 const JavaParamRef<jobject>& java_web_contents) {
39 content::WebContents* web_contents = 39 content::WebContents* web_contents =
40 content::WebContents::FromJavaWebContents(java_web_contents); 40 content::WebContents::FromJavaWebContents(java_web_contents);
41 if (!web_contents) 41 if (!web_contents)
42 return ScopedJavaLocalRef<jobjectArray>(); 42 return ScopedJavaLocalRef<jobjectArray>();
43 43
44 scoped_refptr<net::X509Certificate> cert = 44 scoped_refptr<net::X509Certificate> cert =
45 web_contents->GetController().GetVisibleEntry()->GetSSL().certificate; 45 web_contents->GetController().GetVisibleEntry()->GetSSL().certificate;
46 46
47 std::vector<std::string> cert_chain; 47 std::vector<std::string> cert_chain;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // There's no tab UI on Android - only connection info is shown. 194 // There's no tab UI on Android - only connection info is shown.
195 NOTIMPLEMENTED(); 195 NOTIMPLEMENTED();
196 } 196 }
197 197
198 // static 198 // static
199 bool 199 bool
200 ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid( 200 ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid(
201 JNIEnv* env) { 201 JNIEnv* env) {
202 return RegisterNativesImpl(env); 202 return RegisterNativesImpl(env);
203 } 203 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698