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

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

Issue 2067323004: Allow copying and viewing account credentials in PasswordEntryEditor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add junit test for reauthentication Created 4 years, 4 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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; 5 package org.chromium.chrome.browser;
6 6
7 import org.chromium.base.ObserverList; 7 import org.chromium.base.ObserverList;
8 import org.chromium.base.annotations.CalledByNative; 8 import org.chromium.base.annotations.CalledByNative;
9 9
10 /** 10 /**
11 * Class for retrieving passwords and password exceptions (websites for which Ch rome should not save 11 * Class for retrieving passwords and password exceptions (websites for which Ch rome should not save
12 * password) from native code. 12 * password) from native code.
13 */ 13 */
14 public final class PasswordUIView { 14 public final class PasswordUIView {
15 15
16 /** 16 /**
17 * Class representing information about a saved password entry. 17 * Class representing information about a saved password entry.
18 */ 18 */
19 public static final class SavedPasswordEntry { 19 public static final class SavedPasswordEntry {
20 private final String mUrl; 20 private final String mUrl;
21 private final String mName; 21 private final String mName;
22 private final String mPassword;
22 23
23 private SavedPasswordEntry(String url, String name) { 24 private SavedPasswordEntry(String url, String name, String password) {
24 mUrl = url; 25 mUrl = url;
25 mName = name; 26 mName = name;
27 mPassword = password;
26 } 28 }
27 29
28 public String getUrl() { 30 public String getUrl() {
29 return mUrl; 31 return mUrl;
30 } 32 }
31 33
32 public String getUserName() { 34 public String getUserName() {
33 return mName; 35 return mName;
34 } 36 }
37
38 public String getPassword() {
39 return mPassword;
40 }
35 } 41 }
36 42
37 @CalledByNative 43 @CalledByNative
38 private static SavedPasswordEntry createSavedPasswordEntry(String url, Strin g name) { 44 private static SavedPasswordEntry createSavedPasswordEntry(String url, Strin g name,
39 return new SavedPasswordEntry(url, name); 45 String password) {
46 return new SavedPasswordEntry(url, name, password);
40 } 47 }
41 48
42 /** 49 /**
43 * Interface which client can use to listen to changes to password and passw ord exception lists. 50 * Interface which client can use to listen to changes to password and passw ord exception lists.
44 * Clients can register and unregister themselves with addObserver and remov eObserver. 51 * Clients can register and unregister themselves with addObserver and remov eObserver.
45 */ 52 */
46 public interface PasswordListObserver { 53 public interface PasswordListObserver {
47 /** 54 /**
48 * Called when passwords list is updated. 55 * Called when passwords list is updated.
49 * @param count Number of entries in the password list. 56 * @param count Number of entries in the password list.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 long nativePasswordUIViewAndroid, 183 long nativePasswordUIViewAndroid,
177 int index); 184 int index);
178 185
179 private static native String nativeGetAccountDashboardURL(); 186 private static native String nativeGetAccountDashboardURL();
180 187
181 private static native boolean nativeShouldUseSmartLockBranding(); 188 private static native boolean nativeShouldUseSmartLockBranding();
182 189
183 private native void nativeDestroy(long nativePasswordUIViewAndroid); 190 private native void nativeDestroy(long nativePasswordUIViewAndroid);
184 191
185 } 192 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698