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

Unified Diff: app/l10n_util.cc

Issue 347019: Convert ReplaceStringPlaceholders(std::string...) to take a (Closed)
Patch Set: a Created 11 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 | « no previous file | base/string_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/l10n_util.cc
diff --git a/app/l10n_util.cc b/app/l10n_util.cc
index 854d0a09d05bad148e5325b3979d078e05894988..c04d3d549d7adb3ea097063f42be623e04d9e53f 100644
--- a/app/l10n_util.cc
+++ b/app/l10n_util.cc
@@ -525,6 +525,10 @@ static string16 GetStringF(int message_id,
const string16& c,
const string16& d,
std::vector<size_t>* offsets) {
+ // TODO(tc): We could save a string copy if we got the raw string as
+ // a StringPiece and were able to call ReplaceStringPlaceholders with
+ // a StringPiece format string and string16 substitution strings. In
+ // practice, the strings should be relatively short.
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
const string16& format_string = rb.GetLocalizedString(message_id);
std::vector<string16> subst;
« no previous file with comments | « no previous file | base/string_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698