Commit b268b36e authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Update ProfileNetworkContextService for ephemeral guest profiles.

ProfileNetworkContextService is updated to use Guest policy for
ephemeral Guest profiles.

This change is behind disabled EnableEphemeralGuestProfilesOnDesktop
flag. Please see go/guest-on-disk for more context.

Bug: 1125474
Change-Id: Ic58cbbb3d90ce2edca8d43da2cadab4ef28f5aed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2450189Reviewed-by: default avatarAsanka Herath <asanka@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813776}
parent 050af938
......@@ -136,13 +136,13 @@ network::mojom::AdditionalCertificatesPtr GetAdditionalCertificates(
// feature flag and policy. Next steps would be changing the feature value to
// false after enough heads up and then removing the feature.
bool IsAmbientAuthAllowedForProfile(Profile* profile) {
if (profile->IsRegularProfile())
if (profile->IsRegularProfile() && !profile->IsEphemeralGuestProfile())
return true;
// Non-primary OTR profiles are not used to create browser windows and are
// only technical means for a task that does not need to leave state after
// it's completed.
if (!profile->IsPrimaryOTRProfile())
if (profile->IsOffTheRecord() && !profile->IsPrimaryOTRProfile())
return true;
PrefService* local_state = g_browser_process->local_state();
......@@ -154,7 +154,7 @@ bool IsAmbientAuthAllowedForProfile(Profile* profile) {
static_cast<net::AmbientAuthAllowedProfileTypes>(local_state->GetInteger(
prefs::kAmbientAuthenticationInPrivateModesEnabled));
if (profile->IsGuestSession()) {
if (profile->IsGuestSession() || profile->IsEphemeralGuestProfile()) {
return base::FeatureList::IsEnabled(
features::kEnableAmbientAuthenticationInGuestSession) ||
type == net::AmbientAuthAllowedProfileTypes::GUEST_AND_REGULAR ||
......
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