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

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

Issue 2649903004: kiosk: Allow startup flags for kiosk sessions (Closed)
Patch Set: Created 3 years, 11 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 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 716
717 return true; 717 return true;
718 } 718 }
719 719
720 bool UserSessionManager::RestartToApplyPerSessionFlagsIfNeed( 720 bool UserSessionManager::RestartToApplyPerSessionFlagsIfNeed(
721 Profile* profile, 721 Profile* profile,
722 bool early_restart) { 722 bool early_restart) {
723 if (ProfileHelper::IsSigninProfile(profile)) 723 if (ProfileHelper::IsSigninProfile(profile))
724 return false; 724 return false;
725 725
726 // Kiosk sessions keeps the startup flags.
727 if (user_manager::UserManager::Get() &&
728 user_manager::UserManager::Get()->IsLoggedInAsKioskApp()) {
729 return false;
730 }
731
726 if (early_restart && !CanPerformEarlyRestart()) 732 if (early_restart && !CanPerformEarlyRestart())
727 return false; 733 return false;
728 734
729 // We can't really restart if we've already restarted as a part of 735 // We can't really restart if we've already restarted as a part of
730 // user session restore after crash of in case when flags were changed inside 736 // user session restore after crash of in case when flags were changed inside
731 // user session. 737 // user session.
732 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginUser)) 738 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginUser))
733 return false; 739 return false;
734 740
735 // We can't restart if that's a second user sign in that is happening. 741 // We can't restart if that's a second user sign in that is happening.
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1880 ->browser_policy_connector_chromeos() 1886 ->browser_policy_connector_chromeos()
1881 ->IsEnterpriseManaged()) { 1887 ->IsEnterpriseManaged()) {
1882 return false; 1888 return false;
1883 } 1889 }
1884 1890
1885 // Do not show end of life notification if this is a guest session 1891 // Do not show end of life notification if this is a guest session
1886 return !profile->IsGuestSession(); 1892 return !profile->IsGuestSession();
1887 } 1893 }
1888 1894
1889 } // namespace chromeos 1895 } // 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