summaryrefslogtreecommitdiff
path: root/dom/fetch
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-06-17 09:35:48 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-06-17 09:35:48 +0200
commit07ee0792c9664d649fae8ae530b27462ee45f530 (patch)
tree47536f5fe5f03b41e1868df5e360dfabfef28751 /dom/fetch
parent1f6068bc695b8bee56f0a99e4343ff138b1ee188 (diff)
downloaduxp-07ee0792c9664d649fae8ae530b27462ee45f530.tar.gz
Bug 1398229 - Save-link-as feature should use the loading principal - implementation of nsIContentPolicy.TYPE_SAVE_AS_DOWNLOAD
Diffstat (limited to 'dom/fetch')
-rw-r--r--dom/fetch/InternalRequest.cpp3
-rw-r--r--dom/fetch/InternalRequest.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/dom/fetch/InternalRequest.cpp b/dom/fetch/InternalRequest.cpp
index 85feabde3d..b2631da6a1 100644
--- a/dom/fetch/InternalRequest.cpp
+++ b/dom/fetch/InternalRequest.cpp
@@ -320,6 +320,9 @@ InternalRequest::MapContentPolicyTypeToRequestContext(nsContentPolicyType aConte
case nsIContentPolicy::TYPE_WEB_MANIFEST:
context = RequestContext::Manifest;
break;
+ case nsIContentPolicy::TYPE_SAVEAS_DOWNLOAD:
+ context = RequestContext::Internal;
+ break;
default:
MOZ_ASSERT(false, "Unhandled nsContentPolicyType value");
break;
diff --git a/dom/fetch/InternalRequest.h b/dom/fetch/InternalRequest.h
index 84ee0bf69e..9664906750 100644
--- a/dom/fetch/InternalRequest.h
+++ b/dom/fetch/InternalRequest.h
@@ -53,7 +53,7 @@ namespace dom {
* image | TYPE_INTERNAL_IMAGE, TYPE_INTERNAL_IMAGE_PRELOAD, TYPE_INTERNAL_IMAGE_FAVICON
* imageset | TYPE_IMAGESET
* import | Not supported by Gecko
- * internal | TYPE_DOCUMENT, TYPE_XBL, TYPE_OTHER
+ * internal | TYPE_DOCUMENT, TYPE_XBL, TYPE_OTHER, TYPE_SAVEAS_DOWNLOAD
* location |
* manifest | TYPE_WEB_MANIFEST
* object | TYPE_INTERNAL_OBJECT