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

Unified Diff: chrome/browser/extensions/extension_menu_manager.cc

Issue 5742006: wstrings: make l10n_util::TruncateString use string16 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 | « app/l10n_util_unittest.cc ('k') | chrome/browser/gtk/bookmark_menu_controller_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_menu_manager.cc
diff --git a/chrome/browser/extensions/extension_menu_manager.cc b/chrome/browser/extensions/extension_menu_manager.cc
index 6cc67fa696ab4ab11c5fbb81e6625c034bfae95b..4f4d72f0b3e801ab7a1e6427218f39d19640df33 100644
--- a/chrome/browser/extensions/extension_menu_manager.cc
+++ b/chrome/browser/extensions/extension_menu_manager.cc
@@ -73,10 +73,8 @@ string16 ExtensionMenuItem::TitleWithReplacement(
// put "%s" in titles that won't get substituted.
ReplaceSubstringsAfterOffset(&result, 0, ASCIIToUTF16("%s"), selection);
- if (result.length() > max_length) {
- result = WideToUTF16(l10n_util::TruncateString(UTF16ToWideHack(result),
- max_length));
- }
+ if (result.length() > max_length)
+ result = l10n_util::TruncateString(result, max_length);
return result;
}
« no previous file with comments | « app/l10n_util_unittest.cc ('k') | chrome/browser/gtk/bookmark_menu_controller_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698