| Index: chrome/browser/chromeos/profiles/profile_helper.cc
|
| diff --git a/chrome/browser/chromeos/profiles/profile_helper.cc b/chrome/browser/chromeos/profiles/profile_helper.cc
|
| index 5bc7736b5b63f2d949bdc4add2f21bcdfbaaca26..07ac1adedfe13fb20e9c0bc999a599450d535c86 100644
|
| --- a/chrome/browser/chromeos/profiles/profile_helper.cc
|
| +++ b/chrome/browser/chromeos/profiles/profile_helper.cc
|
| @@ -42,6 +42,9 @@ namespace {
|
| // As defined in /chromeos/dbus/cryptohome_client.cc.
|
| static const char kUserIdHashSuffix[] = "-hash";
|
|
|
| +// The name for the lock screen app profile.
|
| +static const char kLockScreenAppProfileName[] = "LockScreenAppsProfile";
|
| +
|
| bool ShouldAddProfileDirPrefix(const std::string& user_id_hash) {
|
| // Do not add profile dir prefix for legacy profile dir and test
|
| // user profile. The reason of not adding prefix for test user profile
|
| @@ -170,6 +173,24 @@ bool ProfileHelper::IsSigninProfile(const Profile* profile) {
|
| profile->GetPath().BaseName().value() == chrome::kInitialProfile;
|
| }
|
|
|
| +// static
|
| +bool ProfileHelper::IsLockScreenAppProfile(const Profile* profile) {
|
| + return profile &&
|
| + profile->GetPath().BaseName().value() == kLockScreenAppProfileName;
|
| +}
|
| +
|
| +// static
|
| +base::FilePath ProfileHelper::GetLockScreenAppProfilePath() {
|
| + ProfileManager* profile_manager = g_browser_process->profile_manager();
|
| + return profile_manager->user_data_dir().AppendASCII(
|
| + kLockScreenAppProfileName);
|
| +}
|
| +
|
| +// static
|
| +std::string ProfileHelper::GetLockScreenAppProfileName() {
|
| + return kLockScreenAppProfileName;
|
| +}
|
| +
|
| // static
|
| bool ProfileHelper::IsOwnerProfile(const Profile* profile) {
|
| if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| @@ -358,8 +379,10 @@ const user_manager::User* ProfileHelper::GetUserByProfile(
|
| DCHECK(!content::BrowserThread::IsThreadInitialized(
|
| content::BrowserThread::UI) ||
|
| content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
|
| - if (ProfileHelper::IsSigninProfile(profile))
|
| - return NULL;
|
| + if (ProfileHelper::IsSigninProfile(profile) ||
|
| + ProfileHelper::IsLockScreenAppProfile(profile)) {
|
| + return nullptr;
|
| + }
|
|
|
| user_manager::UserManager* user_manager = user_manager::UserManager::Get();
|
|
|
|
|