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

Side by Side Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 2654063003: Merge "kiosk: Allow startup flags for kiosk sessions" (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/session/user_session_manager.h" 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 687
688 return true; 688 return true;
689 } 689 }
690 690
691 bool UserSessionManager::RestartToApplyPerSessionFlagsIfNeed( 691 bool UserSessionManager::RestartToApplyPerSessionFlagsIfNeed(
692 Profile* profile, 692 Profile* profile,
693 bool early_restart) { 693 bool early_restart) {
694 if (ProfileHelper::IsSigninProfile(profile)) 694 if (ProfileHelper::IsSigninProfile(profile))
695 return false; 695 return false;
696 696
697 // Kiosk sessions keeps the startup flags.
698 if (user_manager::UserManager::Get() &&
699 user_manager::UserManager::Get()->IsLoggedInAsKioskApp()) {
700 return false;
701 }
702
697 if (early_restart && !CanPerformEarlyRestart()) 703 if (early_restart && !CanPerformEarlyRestart())
698 return false; 704 return false;
699 705
700 // We can't really restart if we've already restarted as a part of 706 // We can't really restart if we've already restarted as a part of
701 // user session restore after crash of in case when flags were changed inside 707 // user session restore after crash of in case when flags were changed inside
702 // user session. 708 // user session.
703 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginUser)) 709 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginUser))
704 return false; 710 return false;
705 711
706 // We can't restart if that's a second user sign in that is happening. 712 // We can't restart if that's a second user sign in that is happening.
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1870 ->browser_policy_connector_chromeos() 1876 ->browser_policy_connector_chromeos()
1871 ->IsEnterpriseManaged()) { 1877 ->IsEnterpriseManaged()) {
1872 return false; 1878 return false;
1873 } 1879 }
1874 1880
1875 // Do not show end of life notification if this is a guest session 1881 // Do not show end of life notification if this is a guest session
1876 return !profile->IsGuestSession(); 1882 return !profile->IsGuestSession();
1877 } 1883 }
1878 1884
1879 } // namespace chromeos 1885 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698