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

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: 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) &&
bartfab (slow) 2016/04/07 14:55:42 Why is the kiosk user not a known user? We explici
xiyuan 2016/04/07 21:43:57 Makes sense to make kiosk apps part of known users
537 !KioskAppManager::Get()->GetAppByAccountId(account_id, nullptr)) {
537 // When a device-local account is removed, its policy is deleted from disk 538 // 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, 539 // 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 540 // 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 541 // cache. If Chrome crashes later in the session, the policy becomes
541 // completely unavailable. Exit the session in that case, rather than 542 // completely unavailable. Exit the session in that case, rather than
542 // allowing it to continue without policy. 543 // allowing it to continue without policy.
543 chrome::AttemptUserExit(); 544 chrome::AttemptUserExit();
544 return; 545 return;
545 } 546 }
546 547
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 // Destroy DBus services immediately after threads are stopped. 874 // Destroy DBus services immediately after threads are stopped.
874 dbus_services_.reset(); 875 dbus_services_.reset();
875 876
876 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 877 ChromeBrowserMainPartsLinux::PostDestroyThreads();
877 878
878 // Destroy DeviceSettingsService after g_browser_process. 879 // Destroy DeviceSettingsService after g_browser_process.
879 DeviceSettingsService::Shutdown(); 880 DeviceSettingsService::Shutdown();
880 } 881 }
881 882
882 } // namespace chromeos 883 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698