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

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: Rebase 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
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 5bb36c3aaf7350c1296547158dec10819890cf4d..311ea67beccb658aaae676bf4ee2cb5eddffe5d2 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;
}

Powered by Google App Engine
This is Rietveld 408576698