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

Unified Diff: components/autofill/core/browser/autofill_field.cc

Issue 296593003: Make various string_util functions take StringPieces instead of char[]. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resync Created 6 years, 7 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 | « chromeos/system/name_value_pairs_parser.cc ('k') | components/autofill/core/browser/autofill_profile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/autofill_field.cc
diff --git a/components/autofill/core/browser/autofill_field.cc b/components/autofill/core/browser/autofill_field.cc
index c15700ab39c3a594a911230f05efa4543c190e59..bad3b5b680c23c43149930ab8782e3cc08793dd6 100644
--- a/components/autofill/core/browser/autofill_field.cc
+++ b/components/autofill/core/browser/autofill_field.cc
@@ -291,12 +291,9 @@ void FillStreetAddress(const base::string16& value,
return;
}
- base::string16 one_line_value;
- const base::char16 kNewline[] = { '\n', 0 };
- const base::string16 separator =
+ const base::string16& separator =
l10n_util::GetStringUTF16(IDS_AUTOFILL_ADDRESS_LINE_SEPARATOR);
- base::ReplaceChars(value, kNewline, separator, &one_line_value);
- field->value = one_line_value;
+ base::ReplaceChars(value, base::ASCIIToUTF16("\n"), separator, &field->value);
}
std::string Hash32Bit(const std::string& str) {
« no previous file with comments | « chromeos/system/name_value_pairs_parser.cc ('k') | components/autofill/core/browser/autofill_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698