summaryrefslogtreecommitdiffstats
path: root/components/autofill/core/browser/autofill_profile.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-30 08:16:10 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-30 08:16:10 +0000
commitef92dbefb269e1ca548ccb7a7fecb1d69c3a87fe (patch)
tree092af8f9dd66777c0b34975cf999d54b37d6279e /components/autofill/core/browser/autofill_profile.cc
parentc8884db174f04db3f766da5d3caadbd2432c6f84 (diff)
downloadchromium_src-ef92dbefb269e1ca548ccb7a7fecb1d69c3a87fe.zip
chromium_src-ef92dbefb269e1ca548ccb7a7fecb1d69c3a87fe.tar.gz
chromium_src-ef92dbefb269e1ca548ccb7a7fecb1d69c3a87fe.tar.bz2
Make various string_util functions take StringPieces instead of char[].
This allows most callers to pass string literals or results of ASCIIToUTF16(), rather than construct error-prone character arrays that must be manually nul-terminated. Also cleans up various bits of the callers. BUG=104260 TEST=none Review URL: https://codereview.chromium.org/296593003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273765 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/autofill/core/browser/autofill_profile.cc')
-rw-r--r--components/autofill/core/browser/autofill_profile.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/components/autofill/core/browser/autofill_profile.cc b/components/autofill/core/browser/autofill_profile.cc
index b37acd5..fc3f39e 100644
--- a/components/autofill/core/browser/autofill_profile.cc
+++ b/components/autofill/core/browser/autofill_profile.cc
@@ -707,10 +707,9 @@ base::string16 AutofillProfile::ConstructInferredLabel(
}
// Flatten the label if need be.
- const base::char16 kNewline[] = { '\n', 0 };
- const base::string16 newline_separator =
+ const base::string16& line_separator =
l10n_util::GetStringUTF16(IDS_AUTOFILL_ADDRESS_LINE_SEPARATOR);
- base::ReplaceChars(label, kNewline, newline_separator, &label);
+ base::ReplaceChars(label, base::ASCIIToUTF16("\n"), line_separator, &label);
return label;
}