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

Unified Diff: components/autofill/core/browser/autofill_profile.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 | « components/autofill/core/browser/autofill_field.cc ('k') | components/autofill/core/browser/credit_card.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/autofill_profile.cc
diff --git a/components/autofill/core/browser/autofill_profile.cc b/components/autofill/core/browser/autofill_profile.cc
index b37acd50d1d7235aa1c112567167eba678981daa..fc3f39ef259b0e1c54be6dda1f67e2a2c2851ca5 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;
}
« no previous file with comments | « components/autofill/core/browser/autofill_field.cc ('k') | components/autofill/core/browser/credit_card.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698