summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/crx_installer.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-18 21:43:34 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-18 21:43:34 +0000
commit5c851620114bf518835e3ba723b595382d673425 (patch)
tree1f34e812fad9783c365a6a8f30b70008dae030ed /chrome/browser/extensions/crx_installer.cc
parent3f8bf470f51ae847a1fa97ad154cf4b3f244649a (diff)
downloadchromium_src-5c851620114bf518835e3ba723b595382d673425.zip
chromium_src-5c851620114bf518835e3ba723b595382d673425.tar.gz
chromium_src-5c851620114bf518835e3ba723b595382d673425.tar.bz2
Force an app's orgin to be the origin of the URL the crx is
downloaded from. Added machinery to be able to switch this behavior off, so that in the future, we can turn it off for the gallery. BUG=32361 Review URL: http://codereview.chromium.org/890002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/crx_installer.cc')
-rw-r--r--chrome/browser/extensions/crx_installer.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 71397f4..02bc700 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -39,6 +39,7 @@ CrxInstaller::CrxInstaller(const FilePath& install_directory,
install_source_(Extension::INTERNAL),
delete_source_(false),
allow_privilege_increase_(false),
+ force_app_origin_to_download_url_(false),
create_app_shortcut_(false),
frontend_(frontend),
client_(client) {
@@ -71,6 +72,10 @@ void CrxInstaller::InstallCrx(const FilePath& source_file) {
g_browser_process->resource_dispatcher_host(),
this));
+ if (force_app_origin_to_download_url_ && original_url_.is_valid()) {
+ unpacker->set_app_origin_override(original_url_.GetOrigin());
+ }
+
ChromeThread::PostTask(
ChromeThread::FILE, FROM_HERE,
NewRunnableMethod(