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

Side by Side Diff: chrome/browser/chromeos/locale_change_guard.cc

Issue 542623002: Minimal support for OOBE/login for chrome-athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 months 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 unified diff | Download patch
OLDNEW
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
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)
181 // TODO(dpolukhin): Support locale change, crbug.com/411884.
180 ash::Shell::GetInstance()->system_tray_notifier()->NotifyLocaleChanged( 182 ash::Shell::GetInstance()->system_tray_notifier()->NotifyLocaleChanged(
181 this, cur_locale, from_locale_, to_locale_); 183 this, cur_locale, from_locale_, to_locale_);
184 #endif
182 } 185 }
183 186
184 void LocaleChangeGuard::AcceptLocaleChange() { 187 void LocaleChangeGuard::AcceptLocaleChange() {
185 if (profile_ == NULL || 188 if (profile_ == NULL ||
186 from_locale_.empty() || 189 from_locale_.empty() ||
187 to_locale_.empty()) { 190 to_locale_.empty()) {
188 NOTREACHED(); 191 NOTREACHED();
189 return; 192 return;
190 } 193 }
191 194
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 LocaleChangeGuard::GetSkipShowNotificationLanguagesForTesting() { 256 LocaleChangeGuard::GetSkipShowNotificationLanguagesForTesting() {
254 return kSkipShowNotificationLanguages; 257 return kSkipShowNotificationLanguages;
255 } 258 }
256 259
257 // static 260 // static
258 size_t LocaleChangeGuard::GetSkipShowNotificationLanguagesSizeForTesting() { 261 size_t LocaleChangeGuard::GetSkipShowNotificationLanguagesSizeForTesting() {
259 return arraysize(kSkipShowNotificationLanguages); 262 return arraysize(kSkipShowNotificationLanguages);
260 } 263 }
261 264
262 } // namespace chromeos 265 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/wallpaper_private_api.cc ('k') | chrome/browser/chromeos/login/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698