-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Current implementation:
The WebInstallServiceResult is provided from WebInstallServiceImpl to HTMLInstallElement::OnInstallResult(). WebInstallServiceResult has 3 possible results: kSuccess, kAbortError, and kDataError.
Proposal: Good to keep as is
- kSuccess
- Fire promptaction
- kAbortError
- Fire promptdismiss
The question is how do we want to handle kDataError. Options to consider (but open to more ideas):
- Fire
promptdismiss(same as kAbortError)- Probably difficult for developers to differentiate from kAbortErrors and kDataErrors and take appropriate actions.
- Update and add new
invalidReason(existing read-only InPagePermissionMixinBlockerReason that will block the element from being activated. Potential name:install_data_invalid(Naming not finalized). - Do both A and B.
- Create a new read-only
InPagePermissionMixinBlockerReasonsimilar toinvalidReason, such asinstallDataInvalid. (Naming not finalized). - Create a new Event and event handler similar to promptdismiss and onpromptdismiss, such as
promptinvalidsince data errors are typically also a result of a user interaction. (Naming not finalized).
NOTE: WebInstallServiceResults are mapped to install_result_code.h - Chromium Code Search
- kSuccess
- InstallResultcode::kSuccess
- InstallResultcode:: kSuccessAlreadyInstalled
- kAbortError
- InstallResultCode::kUserInstallDeclined - User declines install or launch dialog
- Render frame host is null
- file:// or chrome:// urls used
- Permission denied by user (in content settings or page info)
- Unsupported profiles (Incognito or guest mode)
- Current web contents is being installed via another method
- Default for all other unexpected failures such as the browser crashing, network issues, etc.
- kDataError
- InstallResultCode::kNoCustomManifestId - For . No custom manifest id found in the manifest loaded from the provided install_url.
- InstallResultCode::kManifestIdMismatch - For
- InstallResultCode::kInstallURLLoadFailed - WebAppUrlLoader failed to load installurl
- InstallResultCode::kInstallURLRedirected - A redirecting installurl was used which currently isn’t supported. See crbug.com/471021583
- InstallResultCode::kNotValidManifestForWebApp - No valid manifest found
- InstallResultCode::kNotInstallable - Web App is not considered installable, i.e. missing manifest fields, no service worker, etc.
Metadata
Metadata
Assignees
Labels
No labels