Bug 1286530 - Turn Download API to ChromeOnly draft
authorAlexandre Lissy <lissyx@lissyx.dyndns.org>
Fri, 22 Apr 2016 11:58:51 +0200
changeset 387247 779e2adbcf0be006eda703a2814c1a13dbf6f172
parent 387246 ecdf54a8afa41108d2214ea84ce6f93d37dfbc3d
child 387248 8c171cf52f998e78715205aed1fcb6babbca75e8
push id22914
push userbmo:lissyx+mozillians@lissyx.dyndns.org
push dateWed, 13 Jul 2016 15:39:24 +0000
bugs1286530
milestone50.0a1
Bug 1286530 - Turn Download API to ChromeOnly MozReview-Commit-ID: 3n3gUhRVMoF
dom/webidl/DownloadEvent.webidl
dom/webidl/Downloads.webidl
--- a/dom/webidl/DownloadEvent.webidl
+++ b/dom/webidl/DownloadEvent.webidl
@@ -1,17 +1,17 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Constructor(DOMString type, optional DownloadEventInit eventInitDict),
  Pref="dom.mozDownloads.enabled",
- CheckAnyPermissions="downloads"]
+ ChromeOnly]
 interface DownloadEvent : Event
 {
   readonly attribute DOMDownload? download;
 };
 
 dictionary DownloadEventInit : EventInit
 {
   DOMDownload? download = null;
--- a/dom/webidl/Downloads.webidl
+++ b/dom/webidl/Downloads.webidl
@@ -16,17 +16,17 @@ enum DownloadState {
   "succeeded",
   "finalized"
 };
 
 [NoInterfaceObject,
  NavigatorProperty="mozDownloadManager",
  JSImplementation="@mozilla.org/downloads/manager;1",
  Pref="dom.mozDownloads.enabled",
- CheckAnyPermissions="downloads"]
+ ChromeOnly]
 interface DOMDownloadManager : EventTarget {
   // This promise returns an array of downloads with all the current
   // download objects.
   Promise<sequence<DOMDownload>> getDownloads();
 
   // Removes one download from the downloads set. Returns a promise resolved
   // with the finalized download.
   [UnsafeInPrerendering]
@@ -51,26 +51,25 @@ interface DOMDownloadManager : EventTarg
   //
   // Applications must currently be certified to use this, but it could be
   // widened at a later time.
   //
   // Note that "download" is not actually optional, but WebIDL requires that it
   // be marked as such because it is not followed by a required argument.  The
   // promise will be rejected if the dictionary is omitted or the specified
   // file does not exist on disk.
-  [AvailableIn=CertifiedApps]
   Promise<DOMDownload> adoptDownload(optional AdoptDownloadDict download);
 
   // Fires when a new download starts.
   attribute EventHandler ondownloadstart;
 };
 
 [JSImplementation="@mozilla.org/downloads/download;1",
  Pref="dom.mozDownloads.enabled",
- CheckAnyPermissions="downloads"]
+ ChromeOnly]
 interface DOMDownload : EventTarget {
   // The full size of the resource.
   readonly attribute long long totalBytes;
 
   // The number of bytes that we have currently downloaded.
   readonly attribute long long currentBytes;
 
   // The url of the resource.