diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-26 04:03:17 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-26 04:03:17 +0000 |
commit | 5ab53cb17b7abd215b2c0d373b16058879a7b5c0 (patch) | |
tree | 0f893e00d82621ef77aca52c0cdede24603dcaf3 /chrome/browser/extensions | |
parent | 9deaf306197e5137e7acc920a25873242e6f8c10 (diff) | |
download | chromium_src-5ab53cb17b7abd215b2c0d373b16058879a7b5c0.zip chromium_src-5ab53cb17b7abd215b2c0d373b16058879a7b5c0.tar.gz chromium_src-5ab53cb17b7abd215b2c0d373b16058879a7b5c0.tar.bz2 |
Add hidden component app for web store.
This patch adds a component which does not appear on the NTP, but does enforce that gallery urls are isolated in their own process. This is in anticipation of exposing extension api bindings to the gallery so it can install/detect/uninstall extensions & apps.
Note that this patch works correctly with the --apps-gallery-url. If specified, the replacement url will be inserted into the component app's extent
BUG=27431
Review URL: http://codereview.chromium.org/3116040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57460 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r-- | chrome/browser/extensions/extensions_service.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 169f15f..3fb4a91 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -530,6 +530,21 @@ void ExtensionsService::LoadComponentExtensions() { return; } + // In order for the --apps-gallery-url switch to work with the gallery + // process isolation, we must insert any provided value into the component + // app's launch url and web extent. + if (extension->id() == extension_misc::kWebStoreAppId ) { + GURL gallery_url(CommandLine::ForCurrentProcess() + ->GetSwitchValueASCII(switches::kAppsGalleryURL)); + if (gallery_url.is_valid()) { + extension->set_launch_web_url(gallery_url.spec()); + URLPattern pattern(URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS); + pattern.Parse(gallery_url.spec()); + pattern.set_path(pattern.path() + '*'); + extension->web_extent().AddPattern(pattern); + } + } + OnExtensionLoaded(extension.release(), false); // Don't allow privilege // increase. } |