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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/infobar/SavePasswordInfoBar.java

Issue 641753002: Remove Password Authentication code that is no longer used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.infobar;
6
7 import android.widget.CheckBox;
8
9 import org.chromium.chrome.browser.password_manager.PasswordAuthenticationManage r;
10
11 /**
12 * The infobar that allows saving passwords for autofill.
13 */
14 public class SavePasswordInfoBar extends ConfirmInfoBar {
15
16 private final SavePasswordInfoBarDelegate mDelegate;
17 private final long mNativeInfoBar;
18 private CheckBox mUseAdditionalAuthenticationCheckbox;
19
20 public SavePasswordInfoBar(long nativeInfoBar, SavePasswordInfoBarDelegate d elegate,
21 int iconDrawableId, String message, String primaryButtonText,
22 String secondaryButtonText) {
23 super(nativeInfoBar, null, iconDrawableId, message,
24 null, primaryButtonText, secondaryButtonText);
25 mNativeInfoBar = nativeInfoBar;
26 mDelegate = delegate;
27 }
28
29 @Override
30 public void createContent(InfoBarLayout layout) {
31 if (PasswordAuthenticationManager.isPasswordAuthenticationEnabled()) {
32 mUseAdditionalAuthenticationCheckbox = new CheckBox(getContext());
33 mUseAdditionalAuthenticationCheckbox.setText(
34 PasswordAuthenticationManager.getPasswordProtectionString()) ;
35 layout.setCustomContent(mUseAdditionalAuthenticationCheckbox);
36 }
37
38 super.createContent(layout);
39 }
40
41 @Override
42 public void onButtonClicked(boolean isPrimaryButton) {
43 if (isPrimaryButton && mUseAdditionalAuthenticationCheckbox != null
44 && mUseAdditionalAuthenticationCheckbox.isChecked()) {
45 mDelegate.setUseAdditionalAuthentication(mNativeInfoBar, true);
46 }
47 super.onButtonClicked(isPrimaryButton);
48 }
49 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698