| Index: chrome/browser/chromeos/locale_change_guard.cc
|
| diff --git a/chrome/browser/chromeos/locale_change_guard.cc b/chrome/browser/chromeos/locale_change_guard.cc
|
| index 4af6f6c543f6d3a95169f6773e6d184198eb4771..4ffb7b3cd4862743793eeefdc4ad9364b20fe063 100644
|
| --- a/chrome/browser/chromeos/locale_change_guard.cc
|
| +++ b/chrome/browser/chromeos/locale_change_guard.cc
|
| @@ -3,8 +3,6 @@
|
| // found in the LICENSE file.
|
|
|
| #include "chrome/browser/chromeos/locale_change_guard.h"
|
| -
|
| -#include <algorithm>
|
|
|
| #include "ash/shell.h"
|
| #include "ash/system/tray/system_tray.h"
|
| @@ -35,17 +33,6 @@
|
|
|
| namespace chromeos {
|
|
|
| -namespace {
|
| -
|
| -// This is the list of languages that do not require user notification when
|
| -// locale is switched automatically between regions within the same language.
|
| -//
|
| -// New language in kAcceptLanguageList should be added either here or to
|
| -// to the exception list in unit test.
|
| -const char* const kSkipShowNotificationLanguages[4] = {"en", "de", "fr", "it"};
|
| -
|
| -} // anonymous namespace
|
| -
|
| LocaleChangeGuard::LocaleChangeGuard(Profile* profile)
|
| : profile_(profile),
|
| reverted_(false),
|
| @@ -166,11 +153,7 @@
|
| if (prefs->GetString(prefs::kApplicationLocaleAccepted) == to_locale)
|
| return; // Already accepted.
|
|
|
| - // Locale change detected.
|
| - if (!ShouldShowLocaleChangeNotification(from_locale, to_locale))
|
| - return;
|
| -
|
| - // Showing notification.
|
| + // Locale change detected, showing notification.
|
| if (from_locale_ != from_locale || to_locale_ != to_locale) {
|
| // Falling back to showing message in current locale.
|
| LOG(ERROR) <<
|
| @@ -229,35 +212,4 @@
|
| }
|
| }
|
|
|
| -// static
|
| -bool LocaleChangeGuard::ShouldShowLocaleChangeNotification(
|
| - const std::string& from_locale,
|
| - const std::string& to_locale) {
|
| - const std::string from_lang = l10n_util::GetLanguage(from_locale);
|
| - const std::string to_lang = l10n_util::GetLanguage(to_locale);
|
| -
|
| - if (from_locale == to_locale)
|
| - return false;
|
| -
|
| - if (from_lang != to_lang)
|
| - return true;
|
| -
|
| - const char* const* begin = kSkipShowNotificationLanguages;
|
| - const char* const* end = kSkipShowNotificationLanguages +
|
| - arraysize(kSkipShowNotificationLanguages);
|
| -
|
| - return std::find(begin, end, from_lang) == end;
|
| -}
|
| -
|
| -// static
|
| -const char* const*
|
| -LocaleChangeGuard::GetSkipShowNotificationLanguagesForTesting() {
|
| - return kSkipShowNotificationLanguages;
|
| -}
|
| -
|
| -// static
|
| -size_t LocaleChangeGuard::GetSkipShowNotificationLanguagesSizeForTesting() {
|
| - return arraysize(kSkipShowNotificationLanguages);
|
| -}
|
| -
|
| } // namespace chromeos
|
|
|