OLD | NEW |
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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() > 1) | 713 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() > 1) |
714 return false; | 714 return false; |
715 | 715 |
716 const base::CommandLine user_flags(CreatePerSessionCommandLine(profile)); | 716 const base::CommandLine user_flags(CreatePerSessionCommandLine(profile)); |
717 std::set<base::CommandLine::StringType> command_line_difference; | 717 std::set<base::CommandLine::StringType> command_line_difference; |
718 if (!NeedRestartToApplyPerSessionFlags(user_flags, &command_line_difference)) | 718 if (!NeedRestartToApplyPerSessionFlags(user_flags, &command_line_difference)) |
719 return false; | 719 return false; |
720 | 720 |
721 LogCustomSwitches(command_line_difference); | 721 LogCustomSwitches(command_line_difference); |
722 | 722 |
723 about_flags::ReportCustomFlags("Login.CustomFlags", command_line_difference); | 723 about_flags::ReportAboutFlagsHistogram("Login.CustomFlags", |
| 724 command_line_difference); |
724 | 725 |
725 base::CommandLine::StringVector flags; | 726 base::CommandLine::StringVector flags; |
726 // argv[0] is the program name |base::CommandLine::NO_PROGRAM|. | 727 // argv[0] is the program name |base::CommandLine::NO_PROGRAM|. |
727 flags.assign(user_flags.argv().begin() + 1, user_flags.argv().end()); | 728 flags.assign(user_flags.argv().begin() + 1, user_flags.argv().end()); |
728 LOG(WARNING) << "Restarting to apply per-session flags..."; | 729 LOG(WARNING) << "Restarting to apply per-session flags..."; |
729 DBusThreadManager::Get()->GetSessionManagerClient()->SetFlagsForUser( | 730 DBusThreadManager::Get()->GetSessionManagerClient()->SetFlagsForUser( |
730 cryptohome::Identification( | 731 cryptohome::Identification( |
731 user_manager::UserManager::Get()->GetActiveUser()->GetAccountId()), | 732 user_manager::UserManager::Get()->GetActiveUser()->GetAccountId()), |
732 flags); | 733 flags); |
733 AttemptRestart(profile); | 734 AttemptRestart(profile); |
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1894 ->browser_policy_connector_chromeos() | 1895 ->browser_policy_connector_chromeos() |
1895 ->IsEnterpriseManaged()) { | 1896 ->IsEnterpriseManaged()) { |
1896 return false; | 1897 return false; |
1897 } | 1898 } |
1898 | 1899 |
1899 // Do not show end of life notification if this is a guest session | 1900 // Do not show end of life notification if this is a guest session |
1900 return !profile->IsGuestSession(); | 1901 return !profile->IsGuestSession(); |
1901 } | 1902 } |
1902 | 1903 |
1903 } // namespace chromeos | 1904 } // namespace chromeos |
OLD | NEW |