| Index: chrome/browser/ui/views/toolbar/app_menu.cc
|
| diff --git a/chrome/browser/ui/views/toolbar/app_menu.cc b/chrome/browser/ui/views/toolbar/app_menu.cc
|
| index d6db3cb67851074b58c1c7ffa17dbefa903fc369..a9729da8c1d00463fe0a8d5c82f283ce82fb03f3 100644
|
| --- a/chrome/browser/ui/views/toolbar/app_menu.cc
|
| +++ b/chrome/browser/ui/views/toolbar/app_menu.cc
|
| @@ -10,9 +10,9 @@
|
| #include <cmath>
|
| #include <set>
|
|
|
| +#include "base/i18n/number_formatting.h"
|
| #include "base/macros.h"
|
| #include "base/metrics/histogram.h"
|
| -#include "base/strings/string_number_conversions.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "build/build_config.h"
|
| #include "chrome/app/chrome_command_ids.h"
|
| @@ -538,8 +538,7 @@ class AppMenu::ZoomView : public AppMenuView {
|
| IDS_ZOOM_MINUS2, InMenuButtonBackground::LEFT_BUTTON,
|
| decrement_index, IDS_ACCNAME_ZOOM_MINUS2);
|
|
|
| - zoom_label_ = new Label(
|
| - l10n_util::GetStringFUTF16Int(IDS_ZOOM_PERCENT, 100));
|
| + zoom_label_ = new Label(base::FormatPercent(100));
|
| zoom_label_->SetAutoColorReadabilityEnabled(false);
|
| zoom_label_->SetHorizontalAlignment(gfx::ALIGN_RIGHT);
|
|
|
| @@ -684,9 +683,7 @@ class AppMenu::ZoomView : public AppMenuView {
|
| decrement_button_->SetEnabled(zoom >
|
| selected_tab->GetMinimumZoomPercent());
|
| }
|
| - zoom_label_->SetText(
|
| - l10n_util::GetStringFUTF16Int(IDS_ZOOM_PERCENT, zoom));
|
| -
|
| + zoom_label_->SetText(base::FormatPercent(zoom));
|
| zoom_label_max_width_valid_ = false;
|
| }
|
|
|
| @@ -710,14 +707,12 @@ class AppMenu::ZoomView : public AppMenuView {
|
| zoom_controller->GetZoomPercent());
|
| for (auto zoom : zoom_factors) {
|
| int w = gfx::GetStringWidth(
|
| - l10n_util::GetStringFUTF16Int(IDS_ZOOM_PERCENT,
|
| - static_cast<int>(zoom * 100 + 0.5)),
|
| + base::FormatPercent(static_cast<int>(std::round(zoom * 100))),
|
| font_list);
|
| max_w = std::max(w, max_w);
|
| }
|
| } else {
|
| - max_w = gfx::GetStringWidth(
|
| - l10n_util::GetStringFUTF16Int(IDS_ZOOM_PERCENT, 100), font_list);
|
| + max_w = gfx::GetStringWidth(base::FormatPercent(100), font_list);
|
| }
|
| zoom_label_max_width_ = max_w + border_width;
|
|
|
|
|