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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/KeyStoreSelectionDialog.java

Issue 1474603004: Remove Android support for out-of-process KeyStores (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated comments Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/KeyStoreSelectionDialog.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/KeyStoreSelectionDialog.java b/chrome/android/java/src/org/chromium/chrome/browser/KeyStoreSelectionDialog.java
deleted file mode 100644
index bf382a1dd1bee19ea387ab453d6dc9e8ce697b26..0000000000000000000000000000000000000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/KeyStoreSelectionDialog.java
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser;
-
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.support.v7.app.AlertDialog;
-
-import org.chromium.chrome.R;
-
-/**
- * Client certificate KeyStore selection dialog. When smart card (CAC) support is enabled, this
- * dialog allows choosing between (the default) system certificate store and the smart card for
- * client authentication.
- */
-class KeyStoreSelectionDialog extends DialogFragment {
- private static final CharSequence SYSTEM_STORE = "Android";
-
- private final Runnable mSystemCallback;
- private final Runnable mSmartCardCallback;
- private final Runnable mCancelCallback;
-
- private Runnable mSelectedChoice;
-
- /**
- * Constructor for KeyStore selection dialog.
- *
- * @param systemCallback Runnable that's invoked when the user selects to use the Android
- * system store for authentication
- * @param smartCardCallback Runnable that's invoked when the user selects to use the SmartCard
- * store for authentication
- * @param cancelCallback Runnable that's invoked when the user cancels or closes the dialog.
- */
- public KeyStoreSelectionDialog(Runnable systemCallback, Runnable smartCardCallback,
- Runnable cancelCallback) {
- mSystemCallback = systemCallback;
- mSmartCardCallback = smartCardCallback;
- mCancelCallback = cancelCallback;
-
- // Default to SmartCard
- mSelectedChoice = mSmartCardCallback;
- }
-
- @Override
- public Dialog onCreateDialog(Bundle savedInstanceState) {
- final CharSequence[] choices = {
- getString(R.string.smartcard_certificate_option),
- SYSTEM_STORE
- };
- AlertDialog.Builder builder =
- new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme)
- .setTitle(R.string.smartcard_dialog_title)
- .setSingleChoiceItems(choices, 0, new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int id) {
- if (choices[id] == SYSTEM_STORE) {
- mSelectedChoice = mSystemCallback;
- } else {
- mSelectedChoice = mSmartCardCallback;
- }
- }
- })
- .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int id) {
- mSelectedChoice.run();
- }
- })
- .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int id) {
- mCancelCallback.run();
- }
- });
-
- return builder.create();
- }
-
- @Override
- public void onDismiss(DialogInterface dialog) {
- super.onDismiss(dialog);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698