[ios] Use -[SceneState sceneSessionID] as session identifier
For device that do not support multi-window, the persistent identifier returned by -[UISceneSession persistentIdentifier] may change when the user "swipe" the app (as this gesture is interpreted as "close window" under certain circumstances). In preparation for using a stable identifier (i.e. a constant) for devices that do not support multi-window, do not access the value from UISceneSession directly in Chrome but instead through SceneState. There is one location that is still using -persistentIdentifier: the code responsible for recording the OS message asking Chrome to purge old session data. It is find to use -persistentIdentifier there because the value is correct for device that support multi-window, for other device the value is not used as part of a path to save data thus it is benign to try to delete data from a place that does not exists. Bug: 1165798 Change-Id: I5169b5c0be961987ef8e1edc9c122947848268e9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2626440Reviewed-by:sebsg <sebsg@chromium.org> Commit-Queue: Sylvain Defresne <sdefresne@chromium.org> Auto-Submit: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/master@{#844014}
Showing
Please register or sign in to comment