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

Unified Diff: chrome/browser/ui/android/autofill/autofill_dialog_view_android.cc

Issue 21724002: rAc: try really hard not to ellipsize addresses (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/android/autofill/autofill_dialog_view_android.cc
diff --git a/chrome/browser/ui/android/autofill/autofill_dialog_view_android.cc b/chrome/browser/ui/android/autofill/autofill_dialog_view_android.cc
index 22a7dfc0c035aa9b8734392533eed948daafec0c..60fd6df4897be30720bcb21083e0e1140fcb2f8a 100644
--- a/chrome/browser/ui/android/autofill/autofill_dialog_view_android.cc
+++ b/chrome/browser/ui/android/autofill/autofill_dialog_view_android.cc
@@ -340,7 +340,7 @@ void AutofillDialogViewAndroid::EditingStart(JNIEnv* env, jobject obj,
// TODO(estade): respect |suggestion_state.text_style|.
const SuggestionState& suggestion_state =
controller_->SuggestionStateForSection(section);
- if (suggestion_state.text.empty()) {
+ if (!suggestion_state.show) {
// The section is already in the editing mode, or it's the "Add...".
return;
}
@@ -575,8 +575,10 @@ void AutofillDialogViewAndroid::UpdateOrFillSectionToJava(
const SuggestionState& suggestion_state =
controller_->SuggestionStateForSection(section);
+ // TODO(estade): also make use of |horizontally_compact_text|.
ScopedJavaLocalRef<jstring> suggestion_text =
- base::android::ConvertUTF16ToJavaString(env, suggestion_state.text);
+ base::android::ConvertUTF16ToJavaString(
+ env, suggestion_state.vertically_compact_text);
ScopedJavaLocalRef<jstring> suggestion_text_extra =
base::android::ConvertUTF16ToJavaString(env, suggestion_state.extra_text);
ScopedJavaLocalRef<jobject> suggestion_icon =
@@ -794,7 +796,7 @@ bool AutofillDialogViewAndroid::CollapseUserDataIntoMenuItem(
gfx::Image* icon_to_set) const {
const SuggestionState& suggestion_state =
controller_->SuggestionStateForSection(section);
- if (!suggestion_state.text.empty())
+ if (suggestion_state.show)
return false;
DetailOutputMap inputs;
@@ -829,7 +831,8 @@ bool AutofillDialogViewAndroid::CollapseUserDataIntoMenuItem(
GetBillingInfoFromOutputs(inputs, &card, &profile);
AutofillCreditCardWrapper ccw(&card);
CollapsedAutofillProfileWrapper pw(&profile);
- label = ccw.GetDisplayText();
+ base::string16 unused;
+ ccw.GetDisplayText(&label, &unused);
sublabel = pw.GetDisplayText();
icon = ccw.GetIcon();
break;

Powered by Google App Engine
This is Rietveld 408576698