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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorFieldModel.java

Issue 2110013003: Remove incorrect assert in PaymentRequest address editor UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/payments/AddressEditor.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorFieldModel.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorFieldModel.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorFieldModel.java
index cad157ccee467e88198d609e90f5ef5c84100e58..1bce4bff65570e328a042d11f8ea21588344ddba 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorFieldModel.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorFieldModel.java
@@ -168,17 +168,17 @@ public class EditorFieldModel {
/**
* Updates the value of this field. Does not trigger validation or update the last error
- * message. Should be called only for text fields.
+ * message. Can be called on a dropdown to initialize it, but will not fire the dropdown
+ * callback.
*
- * @param value The new value that the user has typed in.
+ * @param value The new value that the user has typed in or the initial key for the dropdown.
*/
- public void setValue(@Nullable CharSequence value) {
- assert mInputTypeHint != INPUT_TYPE_HINT_DROPDOWN;
- mValue = value;
+ public void setValue(@Nullable CharSequence userTypedValueOrInitialDropdownKey) {
+ mValue = userTypedValueOrInitialDropdownKey;
}
/**
- * Updates the dropdown selection.
+ * Updates the dropdown selection and fires the dropdown callback.
*
* @param key The new dropdown key.
* @param callback The callback to invoke when the change has been processed.
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/payments/AddressEditor.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698