-
Jay Harris authored
File handling is a slightly different to other features which go into origin trial: The underlying OS holds state to let it identify handlers for different file types. This CL cleans up that state when an origin trial expires, so that apps which don't have a valid trial, don't show up as file handlers in the operating system. On navigation to a page inside an installed app with file handlers, we store the time that the trial expires. If the trial has already expired, we unregister the file handlers. If the trial is valid, but the app's file handlers are not registered, we register them. On Chrome start up, we unregister file handlers for all apps for which the origin trial has past it's expiry date. This ensures that apps without a valid origin trial token will show up in the open with menu at most one Chrome restart, or until the user visits the site again, whichever happens first. Bug: 1028448 Change-Id: I6e2d19d7462d1f94955f1ca51abffd2a4c53096d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940001Reviewed-by:
Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Giovanni Ortuño Urquidi <ortuno@chromium.org> Commit-Queue: Jay Harris <harrisjay@chromium.org> Cr-Commit-Position: refs/heads/master@{#739137}
af1ca923