Commit ec83fe68 authored by Kartik Hegde's avatar Kartik Hegde Committed by Commit Bot

Remove separate profile logic

When a user is not logged in, ProfileManager::GetPrimaryUserProfile()
returns an off-the-record profile. Instead of defining our own logic
when a user is not logged in, use the existing logic of the function.

BUG=chromium:956783
TEST=none

Change-Id: I66efde824df0c4b5a22d1f1abdb293ddbea011fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2436510
Commit-Queue: Kartik Hegde <khegde@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812458}
parent a5949935
...@@ -10,9 +10,7 @@ ...@@ -10,9 +10,7 @@
#include "base/no_destructor.h" #include "base/no_destructor.h"
#include "base/rand_util.h" #include "base/rand_util.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_manager.h"
#include "components/session_manager/core/session_manager.h"
#include "content/public/browser/storage_partition.h" #include "content/public/browser/storage_partition.h"
namespace chromeos { namespace chromeos {
...@@ -79,11 +77,6 @@ std::vector<std::string> GetRandomHostsWithFixedHosts(int num_random_hosts, ...@@ -79,11 +77,6 @@ std::vector<std::string> GetRandomHostsWithFixedHosts(int num_random_hosts,
} }
Profile* GetUserProfile() { Profile* GetUserProfile() {
// Use sign-in profile if user has not logged in
if (session_manager::SessionManager::Get()->IsUserSessionBlocked()) {
return ProfileHelper::GetSigninProfile();
}
// Use primary profile if user is logged in
return ProfileManager::GetPrimaryUserProfile(); return ProfileManager::GetPrimaryUserProfile();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment