| 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 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1848 if (!success) | 1848 if (!success) |
| 1849 LOG(ERROR) << "OAuth2 token handle fetch failed."; | 1849 LOG(ERROR) << "OAuth2 token handle fetch failed."; |
| 1850 token_handle_fetcher_.reset(); | 1850 token_handle_fetcher_.reset(); |
| 1851 } | 1851 } |
| 1852 | 1852 |
| 1853 bool UserSessionManager::TokenHandlesEnabled() { | 1853 bool UserSessionManager::TokenHandlesEnabled() { |
| 1854 if (!should_obtain_handles_) | 1854 if (!should_obtain_handles_) |
| 1855 return false; | 1855 return false; |
| 1856 bool ephemeral_users_enabled = false; | 1856 bool ephemeral_users_enabled = false; |
| 1857 bool show_names_on_signin = true; | 1857 bool show_names_on_signin = true; |
| 1858 auto cros_settings = CrosSettings::Get(); | 1858 auto* cros_settings = CrosSettings::Get(); |
| 1859 cros_settings->GetBoolean(kAccountsPrefEphemeralUsersEnabled, | 1859 cros_settings->GetBoolean(kAccountsPrefEphemeralUsersEnabled, |
| 1860 &ephemeral_users_enabled); | 1860 &ephemeral_users_enabled); |
| 1861 cros_settings->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, | 1861 cros_settings->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, |
| 1862 &show_names_on_signin); | 1862 &show_names_on_signin); |
| 1863 return show_names_on_signin && !ephemeral_users_enabled; | 1863 return show_names_on_signin && !ephemeral_users_enabled; |
| 1864 } | 1864 } |
| 1865 | 1865 |
| 1866 void UserSessionManager::Shutdown() { | 1866 void UserSessionManager::Shutdown() { |
| 1867 if (arc::ArcBridgeService::GetEnabled( | 1867 if (arc::ArcBridgeService::GetEnabled( |
| 1868 base::CommandLine::ForCurrentProcess())) { | 1868 base::CommandLine::ForCurrentProcess())) { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1893 ->browser_policy_connector_chromeos() | 1893 ->browser_policy_connector_chromeos() |
| 1894 ->IsEnterpriseManaged()) { | 1894 ->IsEnterpriseManaged()) { |
| 1895 return false; | 1895 return false; |
| 1896 } | 1896 } |
| 1897 | 1897 |
| 1898 // Do not show end of life notification if this is a guest session | 1898 // Do not show end of life notification if this is a guest session |
| 1899 return !profile->IsGuestSession(); | 1899 return !profile->IsGuestSession(); |
| 1900 } | 1900 } |
| 1901 | 1901 |
| 1902 } // namespace chromeos | 1902 } // namespace chromeos |
| OLD | NEW |