Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/locale_change_guard.h" | 5 #include "chrome/browser/chromeos/locale_change_guard.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/system/tray/system_tray.h" | 10 #include "ash/system/tray/system_tray.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 return; | 170 return; |
| 171 | 171 |
| 172 // Showing notification. | 172 // Showing notification. |
| 173 if (from_locale_ != from_locale || to_locale_ != to_locale) { | 173 if (from_locale_ != from_locale || to_locale_ != to_locale) { |
| 174 // Falling back to showing message in current locale. | 174 // Falling back to showing message in current locale. |
| 175 LOG(ERROR) << | 175 LOG(ERROR) << |
| 176 "Showing locale change notification in current (not previous) language"; | 176 "Showing locale change notification in current (not previous) language"; |
| 177 PrepareChangingLocale(from_locale, to_locale); | 177 PrepareChangingLocale(from_locale, to_locale); |
| 178 } | 178 } |
| 179 | 179 |
| 180 #if !defined(USE_ATHENA) | |
|
oshima
2014/09/09 06:32:50
can you file a bug to support locale change in ath
Dmitry Polukhin
2014/09/10 20:30:23
Done. Linked to existing but about local change cr
| |
| 180 ash::Shell::GetInstance()->system_tray_notifier()->NotifyLocaleChanged( | 181 ash::Shell::GetInstance()->system_tray_notifier()->NotifyLocaleChanged( |
| 181 this, cur_locale, from_locale_, to_locale_); | 182 this, cur_locale, from_locale_, to_locale_); |
| 183 #endif | |
| 182 } | 184 } |
| 183 | 185 |
| 184 void LocaleChangeGuard::AcceptLocaleChange() { | 186 void LocaleChangeGuard::AcceptLocaleChange() { |
| 185 if (profile_ == NULL || | 187 if (profile_ == NULL || |
| 186 from_locale_.empty() || | 188 from_locale_.empty() || |
| 187 to_locale_.empty()) { | 189 to_locale_.empty()) { |
| 188 NOTREACHED(); | 190 NOTREACHED(); |
| 189 return; | 191 return; |
| 190 } | 192 } |
| 191 | 193 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 253 LocaleChangeGuard::GetSkipShowNotificationLanguagesForTesting() { | 255 LocaleChangeGuard::GetSkipShowNotificationLanguagesForTesting() { |
| 254 return kSkipShowNotificationLanguages; | 256 return kSkipShowNotificationLanguages; |
| 255 } | 257 } |
| 256 | 258 |
| 257 // static | 259 // static |
| 258 size_t LocaleChangeGuard::GetSkipShowNotificationLanguagesSizeForTesting() { | 260 size_t LocaleChangeGuard::GetSkipShowNotificationLanguagesSizeForTesting() { |
| 259 return arraysize(kSkipShowNotificationLanguages); | 261 return arraysize(kSkipShowNotificationLanguages); |
| 260 } | 262 } |
| 261 | 263 |
| 262 } // namespace chromeos | 264 } // namespace chromeos |
| OLD | NEW |