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

Unified Diff: app/gfx/font_util.cc

Issue 5990008: Remove wstring from l10n_util. Part 1.... (Closed) Base URL: svn://chrome-svn/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
Index: app/gfx/font_util.cc
===================================================================
--- app/gfx/font_util.cc (revision 70069)
+++ app/gfx/font_util.cc (working copy)
@@ -15,8 +15,7 @@
int GetLocalizedContentsWidthForFont(int col_resource_id,
const gfx::Font& font) {
double chars = 0;
- base::StringToDouble(WideToUTF8(l10n_util::GetString(col_resource_id)),
- &chars);
+ base::StringToDouble(l10n_util::GetStringUTF8(col_resource_id), &chars);
int width = font.GetExpectedTextWidth(static_cast<int>(chars));
DCHECK_GT(width, 0);
return width;
@@ -25,8 +24,7 @@
int GetLocalizedContentsHeightForFont(int row_resource_id,
const gfx::Font& font) {
double lines = 0;
- base::StringToDouble(WideToUTF8(l10n_util::GetString(row_resource_id)),
- &lines);
+ base::StringToDouble(l10n_util::GetStringUTF8(row_resource_id), &lines);
int height = static_cast<int>(font.GetHeight() * lines);
DCHECK_GT(height, 0);
return height;

Powered by Google App Engine
This is Rietveld 408576698