| Index: chrome/browser/profiles/profile_impl.cc
|
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
| index 0e6340d54882e17307f2bf2a0251ccfcbf8fdbcb..b1cc6465bfe5cc3c23b506085005977c79ab7e20 100644
|
| --- a/chrome/browser/profiles/profile_impl.cc
|
| +++ b/chrome/browser/profiles/profile_impl.cc
|
| @@ -17,6 +17,7 @@
|
| #include "base/environment.h"
|
| #include "base/files/file_path.h"
|
| #include "base/files/file_util.h"
|
| +#include "base/logging.h"
|
| #include "base/memory/ptr_util.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/metrics/histogram_macros.h"
|
| @@ -128,9 +129,14 @@
|
|
|
| #if defined(OS_CHROMEOS)
|
| #include "chrome/browser/chromeos/locale_change_guard.h"
|
| +#include "chrome/browser/chromeos/login/session/user_session_manager.h"
|
| +#include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h"
|
| +#include "chrome/browser/chromeos/policy/user_policy_manager_factory_chromeos.h"
|
| #include "chrome/browser/chromeos/preferences.h"
|
| #include "chrome/browser/chromeos/profiles/profile_helper.h"
|
| #include "chrome/browser/chromeos/settings/device_settings_service.h"
|
| +#include "components/session_manager/core/session_manager.h"
|
| +#include "components/user_manager/user.h"
|
| #include "components/user_manager/user_manager.h"
|
| #endif
|
|
|
| @@ -138,11 +144,7 @@
|
| #include "chrome/browser/background/background_mode_manager.h"
|
| #endif
|
|
|
| -#if defined(OS_CHROMEOS)
|
| -#include "chrome/browser/chromeos/login/session/user_session_manager.h"
|
| -#include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h"
|
| -#include "chrome/browser/chromeos/policy/user_policy_manager_factory_chromeos.h"
|
| -#else
|
| +#if !defined(OS_CHROMEOS)
|
| #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h"
|
| #include "components/policy/core/common/cloud/user_cloud_policy_manager.h"
|
| #endif
|
| @@ -424,6 +426,21 @@ ProfileImpl::ProfileImpl(
|
| DCHECK(!path.empty()) << "Using an empty path will attempt to write " <<
|
| "profile files to the root directory!";
|
|
|
| +#if defined(OS_CHROMEOS)
|
| + if (!chromeos::ProfileHelper::IsSigninProfile(this)) {
|
| + const user_manager::User* user =
|
| + chromeos::ProfileHelper::Get()->GetUserByProfile(this);
|
| + // A |User| instance should always exist for a profile which is not the
|
| + // initial or the sign-in profile.
|
| + CHECK(user);
|
| + LOG_IF(FATAL,
|
| + !session_manager::SessionManager::Get()->HasSessionForAccountId(
|
| + user->GetAccountId()))
|
| + << "Attempting to construct the profile before starting the user "
|
| + "session";
|
| + }
|
| +#endif
|
| +
|
| #if BUILDFLAG(ENABLE_SESSION_SERVICE)
|
| create_session_service_timer_.Start(FROM_HERE,
|
| TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this,
|
|
|