Commit 5004c000 authored by David Roger's avatar David Roger Committed by Chromium LUCI CQ

[Profiles] Add support for Ephemeral profiles policy to signin creation

This CL fixes a crash happening after creating a signed in profile when
the policy is set.
This CL also adds browser tests checking that the signin profile is
appropriately marked and unmarked ephemeral, and correctly destroyed
at startup if required.

Fixed: 1164314
Change-Id: I078fbc127d42267261b305149aff10e71ac53b59
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2617926
Commit-Queue: David Roger <droger@chromium.org>
Reviewed-by: default avatarJan Krcal <jkrcal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841973}
parent 6172c998
...@@ -801,8 +801,13 @@ void ProfilePickerView::FinishSignedInCreationFlowImpl( ...@@ -801,8 +801,13 @@ void ProfilePickerView::FinishSignedInCreationFlowImpl(
return; return;
} }
// Unmark this profile ephemeral so that it is not deleted upon next startup. if (!signed_in_profile_being_created_->GetPrefs()->GetBoolean(
entry->SetIsEphemeral(false); prefs::kForceEphemeralProfiles)) {
// Unmark this profile ephemeral so that it isn't deleted upon next startup.
// Profiles should never be made non-ephemeral if ephemeral mode is forced
// by policy.
entry->SetIsEphemeral(false);
}
entry->SetLocalProfileName(name_for_signed_in_profile_); entry->SetLocalProfileName(name_for_signed_in_profile_);
ProfileMetrics::LogProfileAddNewUser( ProfileMetrics::LogProfileAddNewUser(
ProfileMetrics::ADD_NEW_PROFILE_PICKER_SIGNED_IN); ProfileMetrics::ADD_NEW_PROFILE_PICKER_SIGNED_IN);
......
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