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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/password/PasswordEntryEditor.java

Issue 2156613002: Modify PasswordEntryEditor UI to display account credentials in a user-friendly manner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add flag Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/password/PasswordEntryEditor.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/PasswordEntryEditor.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/PasswordEntryEditor.java
index 3c32b088800bf1cfb58194150587884395e2656f..87d09b295d1e2d0e45aaa3be88f6e0997c534298 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/PasswordEntryEditor.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/PasswordEntryEditor.java
@@ -13,6 +13,7 @@ import android.widget.Button;
import android.widget.TextView;
import org.chromium.chrome.R;
+import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.PasswordUIView;
import org.chromium.chrome.browser.PasswordUIView.PasswordListObserver;
@@ -37,7 +38,12 @@ public class PasswordEntryEditor extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- View v = inflater.inflate(R.layout.password_entry_editor, container, false);
+ View v;
+ if (ChromeFeatureList.isEnabled("ViewPasswords")) {
+ v = inflater.inflate(R.layout.password_entry_editor_1, container, false);
+ } else {
+ v = inflater.inflate(R.layout.password_entry_editor, container, false);
+ }
getActivity().setTitle(R.string.password_entry_editor_title);
// Extras are set on this intent in class SavePasswordsPreferences.
@@ -48,7 +54,8 @@ public class PasswordEntryEditor extends Fragment {
if (extras.containsKey(SavePasswordsPreferences.PASSWORD_LIST_NAME)) {
name = extras.getString(SavePasswordsPreferences.PASSWORD_LIST_NAME);
}
- TextView nameView = (TextView) v.findViewById(R.id.password_entry_editor_name);
+ TextView nameView =
+ (TextView) v.findViewById(R.id.password_entry_editor_name);
vabr (Chromium) 2016/07/19 08:44:38 nit: The line break seems unnecessary. Could you p
dozsa 2016/07/19 10:01:04 Done.
if (name != null) {
nameView.setText(name);
} else {
@@ -56,10 +63,14 @@ public class PasswordEntryEditor extends Fragment {
mException = true;
}
String url = extras.getString(SavePasswordsPreferences.PASSWORD_LIST_URL);
- TextView urlView = (TextView) v.findViewById(R.id.password_entry_editor_url);
+ TextView urlView =
+ (TextView) v.findViewById(R.id.password_entry_editor_url);
vabr (Chromium) 2016/07/19 08:44:38 nit: Also here, could you please undo the line bre
dozsa 2016/07/19 10:01:04 Done.
urlView.setText(url);
- hookupCancelDeleteButtons(v);
+ if (!ChromeFeatureList.isEnabled("ViewPasswords")) {
+ hookupCancelDeleteButtons(v);
+ }
+
return v;
}

Powered by Google App Engine
This is Rietveld 408576698