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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialog.java

Issue 14129005: Remove "Use billing for shipping" checkbox in favor of item in suggestions menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 8 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/autofill/AutofillDialog.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialog.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialog.java
index aba875325b197b515e7f9b1ea27be5b75e435ac1..f9c42ec9346d120fd3278ac607bc5a85a6842fb1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialog.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialog.java
@@ -156,7 +156,7 @@ public class AutofillDialog extends AlertDialog
}
protected AutofillDialog(Context context, AutofillDialogDelegate delegate,
- String useBillingForShippingText, String saveLocallyText) {
+ String saveLocallyText) {
super(context);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
mDelegate = delegate;
@@ -170,9 +170,6 @@ public class AutofillDialog extends AlertDialog
inflate(R.layout.autofill_dialog_content, null);
mContentView.setAutofillDialog(this);
- CheckBox useBillingCheck = getUseBillingForShippingCheckBox();
- useBillingCheck.setText(useBillingForShippingText);
- useBillingCheck.setChecked(true);
getSaveLocallyCheckBox().setText(saveLocallyText);
String[] labels = new String[AutofillDialogConstants.NUM_SECTIONS];
@@ -308,9 +305,6 @@ public class AutofillDialog extends AlertDialog
}
mDelegate.editingStart(section);
- if (section == AutofillDialogConstants.SECTION_SHIPPING) {
- getUseBillingForShippingCheckBox().setChecked(false);
- }
AutofillDialogMenuItem currentItem =
(AutofillDialogMenuItem) spinner.getItemAtPosition(position);
if (currentItem.mIndex == ADD_MENU_ITEM_INDEX) {
@@ -324,10 +318,6 @@ public class AutofillDialog extends AlertDialog
public void onNothingSelected(AdapterView<?> spinner) {
}
- private CheckBox getUseBillingForShippingCheckBox() {
- return (CheckBox) mContentView.findViewById(R.id.use_billing_checkbox);
- }
-
/**
* @param spinner The dropdown that was selected by the user.
* @param section The section that the dropdown corresponds to.
@@ -456,10 +446,11 @@ public class AutofillDialog extends AlertDialog
combinedItems = Arrays.asList(menuItems);
} else {
combinedItems = new ArrayList<AutofillDialogMenuItem>(
- menuItems.length - 1 + mDefaultMenuItems[section].length);
+ menuItems.length - 2 + mDefaultMenuItems[section].length);
combinedItems.addAll(Arrays.asList(menuItems));
- // Replace the provided "Add... item with ours and add "Edit".
- combinedItems.remove(menuItems.length - 1);
+ // Replace the provided "Add..." item with ours and add "Edit".
+ // Also remove the "Manage..." item (for now).
+ combinedItems.remove(menuItems.length - 2);
combinedItems.addAll(Arrays.asList(mDefaultMenuItems[section]));
}
@@ -558,13 +549,6 @@ public class AutofillDialog extends AlertDialog
}
/**
- * @return Whether the billing address should be used as shipping address.
- */
- public boolean shouldUseBillingForShipping() {
- return getUseBillingForShippingCheckBox().isChecked();
- }
-
- /**
* @return Whether the details entered should be saved locally on the device.
*/
public boolean shouldSaveDetailsLocally() {

Powered by Google App Engine
This is Rietveld 408576698