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

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

Issue 1865133002: kiosk: Fix kiosk session restart (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: restore "PublicAccounts" local state Created 4 years, 8 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) 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 <stddef.h> 7 #include <stddef.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 ChromeBrowserMainPartsLinux::PreProfileInit(); 525 ChromeBrowserMainPartsLinux::PreProfileInit();
526 526
527 if (immediate_login) { 527 if (immediate_login) {
528 const std::string cryptohome_id = 528 const std::string cryptohome_id =
529 parsed_command_line().GetSwitchValueASCII(switches::kLoginUser); 529 parsed_command_line().GetSwitchValueASCII(switches::kLoginUser);
530 const AccountId account_id( 530 const AccountId account_id(
531 cryptohome::Identification::FromString(cryptohome_id).GetAccountId()); 531 cryptohome::Identification::FromString(cryptohome_id).GetAccountId());
532 532
533 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); 533 user_manager::UserManager* user_manager = user_manager::UserManager::Get();
534 534
535 if (policy::IsDeviceLocalAccountUser(account_id.GetUserEmail(), NULL) && 535 if (policy::IsDeviceLocalAccountUser(account_id.GetUserEmail(), nullptr) &&
536 !user_manager->IsKnownUser(account_id)) { 536 !user_manager->IsKnownUser(account_id)) {
537 // When a device-local account is removed, its policy is deleted from disk 537 // When a device-local account is removed, its policy is deleted from disk
538 // immediately. If a session using this account happens to be in progress, 538 // immediately. If a session using this account happens to be in progress,
539 // the session is allowed to continue with policy served from an in-memory 539 // the session is allowed to continue with policy served from an in-memory
540 // cache. If Chrome crashes later in the session, the policy becomes 540 // cache. If Chrome crashes later in the session, the policy becomes
541 // completely unavailable. Exit the session in that case, rather than 541 // completely unavailable. Exit the session in that case, rather than
542 // allowing it to continue without policy. 542 // allowing it to continue without policy.
543 chrome::AttemptUserExit(); 543 chrome::AttemptUserExit();
544 return; 544 return;
545 } 545 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 655
656 // Initialize input methods. 656 // Initialize input methods.
657 input_method::InputMethodManager* manager = 657 input_method::InputMethodManager* manager =
658 input_method::InputMethodManager::Get(); 658 input_method::InputMethodManager::Get();
659 UserSessionManager* session_manager = UserSessionManager::GetInstance(); 659 UserSessionManager* session_manager = UserSessionManager::GetInstance();
660 DCHECK(manager); 660 DCHECK(manager);
661 DCHECK(session_manager); 661 DCHECK(session_manager);
662 662
663 manager->SetState(session_manager->GetDefaultIMEState(profile())); 663 manager->SetState(session_manager->GetDefaultIMEState(profile()));
664 664
665 bool is_running_test = parameters().ui_task != NULL; 665 bool is_running_test = parameters().ui_task != nullptr;
666 g_browser_process->platform_part()->InitializeSessionManager( 666 g_browser_process->platform_part()->InitializeSessionManager(
667 parsed_command_line(), profile(), is_running_test); 667 parsed_command_line(), profile(), is_running_test);
668 g_browser_process->platform_part()->SessionManager()->Start(); 668 g_browser_process->platform_part()->SessionManager()->Start();
669 669
670 // Guest user profile is never initialized with locale settings, 670 // Guest user profile is never initialized with locale settings,
671 // so we need special handling for Guest session. 671 // so we need special handling for Guest session.
672 if (user_manager::UserManager::Get()->IsLoggedInAsGuest()) 672 if (user_manager::UserManager::Get()->IsLoggedInAsGuest())
673 SetGuestLocale(profile()); 673 SetGuestLocale(profile());
674 674
675 peripheral_battery_observer_.reset(new PeripheralBatteryObserver()); 675 peripheral_battery_observer_.reset(new PeripheralBatteryObserver());
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 // Destroy DBus services immediately after threads are stopped. 873 // Destroy DBus services immediately after threads are stopped.
874 dbus_services_.reset(); 874 dbus_services_.reset();
875 875
876 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 876 ChromeBrowserMainPartsLinux::PostDestroyThreads();
877 877
878 // Destroy DeviceSettingsService after g_browser_process. 878 // Destroy DeviceSettingsService after g_browser_process.
879 DeviceSettingsService::Shutdown(); 879 DeviceSettingsService::Shutdown();
880 } 880 }
881 881
882 } // namespace chromeos 882 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698