OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/chrome_browser_main_chromeos.h" | 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 new locale_util::SwitchLanguageCallback(base::Bind( | 602 new locale_util::SwitchLanguageCallback(base::Bind( |
603 &GuestLanguageSetCallbackData::Callback, base::Passed(data.Pass())))); | 603 &GuestLanguageSetCallbackData::Callback, base::Passed(data.Pass())))); |
604 User* const user = usermanager->GetUserByProfile(profile); | 604 User* const user = usermanager->GetUserByProfile(profile); |
605 usermanager->RespectLocalePreference(profile, user, callback.Pass()); | 605 usermanager->RespectLocalePreference(profile, user, callback.Pass()); |
606 } | 606 } |
607 | 607 |
608 void ChromeBrowserMainPartsChromeos::PostProfileInit() { | 608 void ChromeBrowserMainPartsChromeos::PostProfileInit() { |
609 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 609 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
610 // -- just after CreateProfile(). | 610 // -- just after CreateProfile(). |
611 | 611 |
| 612 // Force loading of signin profile if it was not loaded before. It is possible |
| 613 // when we are restoring session or skipping login screen for some other |
| 614 // reason. |
| 615 if (!chromeos::ProfileHelper::IsSigninProfile(profile())) |
| 616 chromeos::ProfileHelper::GetSigninProfile(); |
| 617 |
612 // Restarting Chrome inside existing user session. Possible cases: | 618 // Restarting Chrome inside existing user session. Possible cases: |
613 // 1. Chrome is restarted after crash. | 619 // 1. Chrome is restarted after crash. |
614 // 2. Chrome is started in browser_tests skipping the login flow | 620 // 2. Chrome is started in browser_tests skipping the login flow |
615 // 3. Chrome is started on dev machine | 621 // 3. Chrome is started on dev machine |
616 // i.e. not on Chrome OS device w/o login flow. | 622 // i.e. not on Chrome OS device w/o login flow. |
617 if (parsed_command_line().HasSwitch(switches::kLoginUser) && | 623 if (parsed_command_line().HasSwitch(switches::kLoginUser) && |
618 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { | 624 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { |
619 std::string login_user = parsed_command_line().GetSwitchValueASCII( | 625 std::string login_user = parsed_command_line().GetSwitchValueASCII( |
620 chromeos::switches::kLoginUser); | 626 chromeos::switches::kLoginUser); |
621 if (!base::SysInfo::IsRunningOnChromeOS() && | 627 if (!base::SysInfo::IsRunningOnChromeOS() && |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 // Destroy DBus services immediately after threads are stopped. | 861 // Destroy DBus services immediately after threads are stopped. |
856 dbus_services_.reset(); | 862 dbus_services_.reset(); |
857 | 863 |
858 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 864 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
859 | 865 |
860 // Destroy DeviceSettingsService after g_browser_process. | 866 // Destroy DeviceSettingsService after g_browser_process. |
861 DeviceSettingsService::Shutdown(); | 867 DeviceSettingsService::Shutdown(); |
862 } | 868 } |
863 | 869 |
864 } // namespace chromeos | 870 } // namespace chromeos |
OLD | NEW |