diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-03 21:50:42 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-03 21:50:42 +0000 |
commit | be18e1585c52880ceb0a15a3260a579a2b06cbeb (patch) | |
tree | 719296a45edd1140171dd31b200d9e336215fabc /chrome/browser/extensions/sandboxed_extension_unpacker.h | |
parent | 51a0bb591440055191f7dd5ca1077238369b57bd (diff) | |
download | chromium_src-be18e1585c52880ceb0a15a3260a579a2b06cbeb.zip chromium_src-be18e1585c52880ceb0a15a3260a579a2b06cbeb.tar.gz chromium_src-be18e1585c52880ceb0a15a3260a579a2b06cbeb.tar.bz2 |
Force web_origin to be present only on extension gallery installs. For
non-gallery installs, use the download URL as origin.
BUG=40848
Review URL: http://codereview.chromium.org/2517001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48878 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/sandboxed_extension_unpacker.h')
-rw-r--r-- | chrome/browser/extensions/sandboxed_extension_unpacker.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.h b/chrome/browser/extensions/sandboxed_extension_unpacker.h index 42a334061..4c89082 100644 --- a/chrome/browser/extensions/sandboxed_extension_unpacker.h +++ b/chrome/browser/extensions/sandboxed_extension_unpacker.h @@ -97,9 +97,10 @@ class SandboxedExtensionUnpacker : public UtilityProcessHost::Client { ResourceDispatcherHost* rdh, SandboxedExtensionUnpackerClient* cilent); - const GURL& web_origin() const { return web_origin_; } + const GURL& web_origin() const { return web_origin_override_; } void set_web_origin(const GURL& val) { - web_origin_ = val; + web_origin_override_ = val; + force_web_origin_override_ = true; } // Start unpacking the extension. The client is called with the results. @@ -173,10 +174,14 @@ class SandboxedExtensionUnpacker : public UtilityProcessHost::Client { // The public key that was extracted from the CRX header. std::string public_key_; - // If the unpacked extension uses web content, its origin will be set to this - // value. This is used when an app is self-hosted. The only valid origin is - // the origin it is served from. - GURL web_origin_; + // If the app uses web content, its origin will be set to this value. This is + // used when an app is self-hosted. The only valid origin is the origin it is + // served from. + GURL web_origin_override_; + + // If true, we require the web_origin field to be empty in the manifest. + // Instead, we use the one given in web_origin_override_. Defaults to false. + bool force_web_origin_override_; }; #endif // CHROME_BROWSER_EXTENSIONS_SANDBOXED_EXTENSION_UNPACKER_H_ |