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

Unified Diff: chrome/browser/autofill/autofill_profile.cc

Issue 3806008: Never allow empty preview entries. As some data is always present (we drop co... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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/browser/autofill/autofill_profile.h ('k') | chrome/browser/autofill/autofill_profile_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_profile.cc
===================================================================
--- chrome/browser/autofill/autofill_profile.cc (revision 63786)
+++ chrome/browser/autofill/autofill_profile.cc (working copy)
@@ -175,50 +175,6 @@
return label_;
}
-string16 AutoFillProfile::PreviewSummary() const {
- // Fetch the components of the summary string. Any or all of these
- // may be an empty string.
- string16 first_name = GetFieldText(AutoFillType(NAME_FIRST));
- string16 last_name = GetFieldText(AutoFillType(NAME_LAST));
- string16 address = GetFieldText(AutoFillType(ADDRESS_HOME_LINE1));
-
- // String separators depend (below) on the existence of the various fields.
- bool have_first_name = first_name.length() > 0;
- bool have_last_name = last_name.length() > 0;
- bool have_address = address.length() > 0;
-
- // Name separator defaults to "". Space if we have first and last name.
- string16 name_separator;
-
- if (have_first_name && have_last_name) {
- name_separator = l10n_util::GetStringUTF16(
- IDS_AUTOFILL_DIALOG_ADDRESS_NAME_SEPARATOR);
- }
-
- // E.g. "John Smith", or "John", or "Smith", or "".
- string16 name_format = l10n_util::GetStringFUTF16(
- IDS_AUTOFILL_DIALOG_ADDRESS_SUMMARY_NAME_FORMAT,
- first_name,
- name_separator,
- last_name);
-
- // Summary separator defaults to "". ", " if we have name and address.
- string16 summary_separator;
- if ((have_first_name || have_last_name) && have_address) {
- summary_separator = l10n_util::GetStringUTF16(
- IDS_AUTOFILL_DIALOG_ADDRESS_SUMMARY_SEPARATOR);
- }
-
- // E.g. "John Smith, 123 Main Street".
- string16 summary_format = l10n_util::GetStringFUTF16(
- IDS_AUTOFILL_DIALOG_ADDRESS_SUMMARY_FORMAT,
- name_format,
- summary_separator,
- address);
-
- return summary_format;
-}
-
// static
bool AutoFillProfile::AdjustInferredLabels(
std::vector<AutoFillProfile*>* profiles) {
« no previous file with comments | « chrome/browser/autofill/autofill_profile.h ('k') | chrome/browser/autofill/autofill_profile_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698