Commit f800edbd authored by Daniel Murphy's avatar Daniel Murphy Committed by Commit Bot

Hardcode default apps to not have protected storage.

This fixes an issue I introduced in m85 here:
https://chromium-review.googlesource.com/c/chromium/src/+/2181827
during our migration of all "bookmark apps" off of the extensions system
and onto the WebAppProvider system.

Making YouTube no longer a 'bookmark app' (and back to a hosted app)
had the side effect of making its storage protected, because apparently
all hosted apps have their storage protected.

This change marks all potential default hosted apps as no longer
receiving protected storage.

The long term fix for this issue is to have the WebAppProvider system
support default apps, and migrate these old hosted apps (which is a
double-deprecated system) onto the WebApp platform:
https://bugs.chromium.org/p/chromium/issues/detail?id=1140122

R=cmp@chromium.org

Bug: 1139902
Change-Id: I0d09eed3bf232407192fd07e621b82bcac4263f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485436Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Reviewed-by: default avatarChase Phillips <cmp@chromium.org>
Reviewed-by: default avatarVictor Costan <pwnall@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818570}
parent f4d00c78
...@@ -171,7 +171,9 @@ bool ExtensionSpecialStoragePolicy::IsStorageDurable(const GURL& origin) { ...@@ -171,7 +171,9 @@ bool ExtensionSpecialStoragePolicy::IsStorageDurable(const GURL& origin) {
bool ExtensionSpecialStoragePolicy::NeedsProtection( bool ExtensionSpecialStoragePolicy::NeedsProtection(
const extensions::Extension* extension) { const extensions::Extension* extension) {
return extension->is_hosted_app() && !extension->from_bookmark(); // Default-installed apps should never be granted protected storage.
return extension->is_hosted_app() && !extension->from_bookmark() &&
!extension->was_installed_by_default();
} }
const extensions::ExtensionSet* const extensions::ExtensionSet*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment