OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/login/base_login_display_host.h" | 5 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/threading/thread_restrictions.h" | 10 #include "base/threading/thread_restrictions.h" |
11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/browser_shutdown.h" | 12 #include "chrome/browser/browser_shutdown.h" |
13 #include "chrome/browser/chromeos/cros/cros_library.h" | 13 #include "chrome/browser/chromeos/cros/cros_library.h" |
14 #include "chrome/browser/chromeos/cros/login_library.h" | 14 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 15 #include "chrome/browser/chromeos/dbus/session_manager_client.h" |
15 #include "chrome/browser/chromeos/customization_document.h" | 16 #include "chrome/browser/chromeos/customization_document.h" |
16 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 17 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
17 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 18 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
18 #include "chrome/browser/chromeos/language_preferences.h" | 19 #include "chrome/browser/chromeos/language_preferences.h" |
19 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 20 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
20 #include "chrome/browser/chromeos/login/helper.h" | 21 #include "chrome/browser/chromeos/login/helper.h" |
21 #include "chrome/browser/chromeos/login/language_switch_menu.h" | 22 #include "chrome/browser/chromeos/login/language_switch_menu.h" |
22 #include "chrome/browser/chromeos/login/login_utils.h" | 23 #include "chrome/browser/chromeos/login/login_utils.h" |
23 #include "chrome/browser/chromeos/login/user_manager.h" | 24 #include "chrome/browser/chromeos/login/user_manager.h" |
24 #include "chrome/browser/chromeos/login/views_login_display_host.h" | 25 #include "chrome/browser/chromeos/login/views_login_display_host.h" |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 << locale; | 343 << locale; |
343 // Set the application locale here so that the language switch | 344 // Set the application locale here so that the language switch |
344 // menu works properly with the newly loaded locale. | 345 // menu works properly with the newly loaded locale. |
345 g_browser_process->SetApplicationLocale(loaded_locale); | 346 g_browser_process->SetApplicationLocale(loaded_locale); |
346 } | 347 } |
347 } | 348 } |
348 | 349 |
349 display_host->StartWizard(first_screen_name, GURL()); | 350 display_host->StartWizard(first_screen_name, GURL()); |
350 | 351 |
351 chromeos::LoginUtils::Get()->PrewarmAuthentication(); | 352 chromeos::LoginUtils::Get()->PrewarmAuthentication(); |
352 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) | 353 chromeos::DBusThreadManager::Get()->session_manager_client() |
353 chromeos::CrosLibrary::Get()->GetLoginLibrary()->EmitLoginPromptReady(); | 354 ->EmitLoginPromptReady(); |
354 | 355 |
355 // Set initial timezone if specified by customization. | 356 // Set initial timezone if specified by customization. |
356 const std::string timezone_name = startup_manifest->initial_timezone(); | 357 const std::string timezone_name = startup_manifest->initial_timezone(); |
357 VLOG(1) << "Initial time zone: " << timezone_name; | 358 VLOG(1) << "Initial time zone: " << timezone_name; |
358 // Apply locale customizations only once to preserve whatever locale | 359 // Apply locale customizations only once to preserve whatever locale |
359 // user has changed to during OOBE. | 360 // user has changed to during OOBE. |
360 if (!timezone_name.empty()) { | 361 if (!timezone_name.empty()) { |
361 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( | 362 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( |
362 icu::UnicodeString::fromUTF8(timezone_name)); | 363 icu::UnicodeString::fromUTF8(timezone_name)); |
363 CHECK(timezone) << "Timezone could not be set for " << timezone_name; | 364 CHECK(timezone) << "Timezone could not be set for " << timezone_name; |
364 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); | 365 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); |
365 } | 366 } |
366 } | 367 } |
367 | 368 |
368 } // namespace browser | 369 } // namespace browser |
OLD | NEW |