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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/pageinfo/ConnectionInfoPopup.java

Issue 2567673002: Factor getCertificateChain out of ConnectionPopupInfo (Closed)
Patch Set: Address review comments 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 package org.chromium.chrome.browser.pageinfo; 5 package org.chromium.chrome.browser.pageinfo;
6 6
7 import android.app.Dialog; 7 import android.app.Dialog;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.DialogInterface; 9 import android.content.DialogInterface;
10 import android.content.Intent; 10 import android.content.Intent;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 ViewGroup.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.W RAP_CONTENT); 200 ViewGroup.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.W RAP_CONTENT);
201 mDialog.show(); 201 mDialog.show();
202 } 202 }
203 203
204 @Override 204 @Override
205 public void onClick(View v) { 205 public void onClick(View v) {
206 if (mResetCertDecisionsButton == v) { 206 if (mResetCertDecisionsButton == v) {
207 nativeResetCertDecisions(mNativeConnectionInfoPopup, mWebContents); 207 nativeResetCertDecisions(mNativeConnectionInfoPopup, mWebContents);
208 mDialog.dismiss(); 208 mDialog.dismiss();
209 } else if (mCertificateViewer == v) { 209 } else if (mCertificateViewer == v) {
210 byte[][] certChain = nativeGetCertificateChain(mWebContents); 210 byte[][] certChain = CertificateChainHelper.getCertificateChain(mWeb Contents);
211 if (certChain == null) { 211 if (certChain == null) {
212 // The WebContents may have been destroyed/invalidated. If so, 212 // The WebContents may have been destroyed/invalidated. If so,
213 // ignore this request. 213 // ignore this request.
214 return; 214 return;
215 } 215 }
216 CertificateViewer.showCertificateChain(mContext, certChain); 216 CertificateViewer.showCertificateChain(mContext, certChain);
217 } else if (mMoreInfoLink == v) { 217 } else if (mMoreInfoLink == v) {
218 mDialog.dismiss(); 218 mDialog.dismiss();
219 try { 219 try {
220 Intent i = Intent.parseUri(mLinkUrl, Intent.URI_INTENT_SCHEME); 220 Intent i = Intent.parseUri(mLinkUrl, Intent.URI_INTENT_SCHEME);
(...skipping 19 matching lines...) Expand all
240 */ 240 */
241 public static void show(Context context, WebContents webContents) { 241 public static void show(Context context, WebContents webContents) {
242 new ConnectionInfoPopup(context, webContents); 242 new ConnectionInfoPopup(context, webContents);
243 } 243 }
244 244
245 private static native long nativeInit(ConnectionInfoPopup popup, 245 private static native long nativeInit(ConnectionInfoPopup popup,
246 WebContents webContents); 246 WebContents webContents);
247 private native void nativeDestroy(long nativeConnectionInfoPopupAndroid); 247 private native void nativeDestroy(long nativeConnectionInfoPopupAndroid);
248 private native void nativeResetCertDecisions( 248 private native void nativeResetCertDecisions(
249 long nativeConnectionInfoPopupAndroid, WebContents webContents); 249 long nativeConnectionInfoPopupAndroid, WebContents webContents);
250 private native byte[][] nativeGetCertificateChain(WebContents webContents);
251 } 250 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698