| 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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 | 590 |
| 591 void UserSessionManager::InitRlz(Profile* profile) { | 591 void UserSessionManager::InitRlz(Profile* profile) { |
| 592 #if BUILDFLAG(ENABLE_RLZ) | 592 #if BUILDFLAG(ENABLE_RLZ) |
| 593 if (!g_browser_process->local_state()->HasPrefPath(prefs::kRLZBrand)) { | 593 if (!g_browser_process->local_state()->HasPrefPath(prefs::kRLZBrand)) { |
| 594 // Read brand code asynchronously from an OEM data and repost ourselves. | 594 // Read brand code asynchronously from an OEM data and repost ourselves. |
| 595 google_brand::chromeos::InitBrand( | 595 google_brand::chromeos::InitBrand( |
| 596 base::Bind(&UserSessionManager::InitRlz, AsWeakPtr(), profile)); | 596 base::Bind(&UserSessionManager::InitRlz, AsWeakPtr(), profile)); |
| 597 return; | 597 return; |
| 598 } | 598 } |
| 599 base::PostTaskWithTraitsAndReplyWithResult( | 599 base::PostTaskWithTraitsAndReplyWithResult( |
| 600 FROM_HERE, base::TaskTraits() | 600 FROM_HERE, |
| 601 .WithShutdownBehavior( | 601 {base::MayBlock(), base::TaskPriority::BACKGROUND, |
| 602 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN) | 602 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, |
| 603 .WithPriority(base::TaskPriority::BACKGROUND) | |
| 604 .MayBlock(), | |
| 605 base::Bind(&base::PathExists, GetRlzDisabledFlagPath()), | 603 base::Bind(&base::PathExists, GetRlzDisabledFlagPath()), |
| 606 base::Bind(&UserSessionManager::InitRlzImpl, AsWeakPtr(), profile)); | 604 base::Bind(&UserSessionManager::InitRlzImpl, AsWeakPtr(), profile)); |
| 607 #endif | 605 #endif |
| 608 } | 606 } |
| 609 | 607 |
| 610 void UserSessionManager::InitNonKioskExtensionFeaturesSessionType( | 608 void UserSessionManager::InitNonKioskExtensionFeaturesSessionType( |
| 611 const user_manager::User* user) { | 609 const user_manager::User* user) { |
| 612 // Kiosk session should be set as part of kiosk user session initialization | 610 // Kiosk session should be set as part of kiosk user session initialization |
| 613 // in normal circumstances (to be able to properly determine whether kiosk | 611 // in normal circumstances (to be able to properly determine whether kiosk |
| 614 // was auto-launched); in case of user session restore, feature session | 612 // was auto-launched); in case of user session restore, feature session |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1936 ->browser_policy_connector_chromeos() | 1934 ->browser_policy_connector_chromeos() |
| 1937 ->IsEnterpriseManaged()) { | 1935 ->IsEnterpriseManaged()) { |
| 1938 return false; | 1936 return false; |
| 1939 } | 1937 } |
| 1940 | 1938 |
| 1941 // Do not show end of life notification if this is a guest session | 1939 // Do not show end of life notification if this is a guest session |
| 1942 return !profile->IsGuestSession(); | 1940 return !profile->IsGuestSession(); |
| 1943 } | 1941 } |
| 1944 | 1942 |
| 1945 } // namespace chromeos | 1943 } // namespace chromeos |
| OLD | NEW |