Chromium Code Reviews| 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..ea194cc53121bd1b76127eb12b9a12f842d58896 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; |
| @@ -28,6 +29,8 @@ public class PasswordEntryEditor extends Fragment { |
| // If false this represents a saved name/password. |
| private boolean mException; |
| + public String VIEW_PASSWORDS = "view-passwords"; |
|
vabr (Chromium)
2016/07/19 10:54:12
Should this be final?
Bernhard Bauer
2016/07/19 11:46:50
And static.
dozsa
2016/07/20 12:07:09
Done.
|
| + |
| @Override |
| public void onCreate(Bundle savedInstanceState) { |
| super.onCreate(savedInstanceState); |
| @@ -37,7 +40,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(VIEW_PASSWORDS)) { |
| + v = inflater.inflate(R.layout.password_entry_editor_1, container, false); |
|
Bernhard Bauer
2016/07/19 11:46:50
Props for using zero-based indexing, but can we us
dozsa
2016/07/20 12:07:08
Would calling it "interactive" be appropriate? Giv
|
| + } 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. |
| @@ -58,8 +66,9 @@ public class PasswordEntryEditor extends Fragment { |
| String url = extras.getString(SavePasswordsPreferences.PASSWORD_LIST_URL); |
| TextView urlView = (TextView) v.findViewById(R.id.password_entry_editor_url); |
| urlView.setText(url); |
| - |
| - hookupCancelDeleteButtons(v); |
| + if (!ChromeFeatureList.isEnabled(VIEW_PASSWORDS)) { |
| + hookupCancelDeleteButtons(v); |
| + } |
| return v; |
| } |