[Reland] Chrome OS: Only restart chrome if site isolation command line flags change
On user session start, only request the chrome process to be restarted if site isolation policies effectively change between the sign-in screen and the user session. The DeviceLoginScreenSitePerProcess and DeviceLoginScreenIsolateOrigins policies map to --site-per-process and --isolate-origins command-line flags passed to the sign-in screen chrome process by session manager (see CL:924421). The user session should respect SitePerProcess/IsolateOrigins user policies instead. Replace special handling of the site isolation flags with placing them between --policy-flags-begin and --policy-flags-end sentinels. This makes sure that chrome is restarted exactly when the user session flags don't match the login screen flags. Background: chrome decides if it should be restarted by comparing the parts of the current command line with parts of the target command line. Specifically, the parts between flags and policy sentinels are compared. Also, evaluate the user policies mapped through user Profile prefs instead of local_state. Reason: When login_manager starts chrome with site isolation flags, the prefs are set by ChromeCommandLinePrefStore. TBR=xiyuan@chromium.org Bug: 800117 Test: browser_tests --gtest_filter=*SiteIsolationFlagHandlingTest* Change-Id: I85d47bd2a4da9155e9c6ad338284e1bfed5b478e Reviewed-on: https://chromium-review.googlesource.com/924147 Commit-Queue: Pavol Marko <pmarko@chromium.org> Reviewed-by:Maksim Ivanov <emaxx@chromium.org> Reviewed-by:
Xiyuan Xia <xiyuan@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#537733} Reviewed-on: https://chromium-review.googlesource.com/926370 Cr-Commit-Position: refs/heads/master@{#537793}
Showing
This diff is collapsed.
Please register or sign in to comment