Add fieldtrial config for DestroyProfileOnBrowserClose

This changes automated tests on CQ and waterfall, so they now have the
DestroyProfileOnBrowserClose flag enabled by default.

Previously, Profile* objects were deleted during BrowserProcess
teardown. With this flag, Profile* will get deleted as soon as it has no
more browser-windows opened. This also deletes any other objects tied to
that Profile's lifetime (e.g., KeyedServices).

This CL is VERY likely to cause new test failures on waterfall after it
lands, or introduce new bugs in developer builds. This will manifest as
crashes/use-after-free bugs during Profile shutdown (when a browser
window is closed).

This only affects Windows, macOS, and desktop Linux.

go/destroy-profile-on-browser-close

Bug: 88586, 1191460
Change-Id: I97d1c12c398532c6115e70568a07e3a53dfc646b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2503629
Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#879898}
NOKEYCHECK=True
GitOrigin-RevId: 6510793d8fcfa4e6765f3bdd636755baaafbc280
1 file changed