toolkit/components/jsdownloads/public/mozIDownloadPlatform.idl

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #include "nsISupports.idl"
     7 interface nsIURI;
     8 interface nsIFile;
    10 [scriptable, uuid(9f556e4a-d9b3-46c3-9f8f-d0db1ac6c8c1)]
    11 interface mozIDownloadPlatform : nsISupports
    12 {
    13   /**
    14    * Perform platform specific operations when a download is done.
    15    *
    16    *   Windows:
    17    *     Add the download to the recent documents list
    18    *     Set the file to be indexed for searching
    19    *   Mac:
    20    *     Bounce the downloads dock icon
    21    *   GTK:
    22    *     Add the download to the recent documents list
    23    *     Save the source uri in the downloaded file's metadata
    24    *   Android:
    25    *     Scan media
    26    *
    27    * @param aSource
    28    *        Source URI of the download
    29    * @param aTarget
    30    *        Downloaded file
    31    * @param aContentType
    32    *        The source's content type
    33    * @param aIsPrivate
    34    *        True for private downloads
    35    * @return none
    36    */
    37   void downloadDone(in nsIURI aSource, in nsIFile aTarget,
    38                     in ACString aContentType, in boolean aIsPrivate);
    40   /**
    41    * Security Zone constants. Used by mapUrlToZone().
    42    */
    43   const unsigned long ZONE_MY_COMPUTER = 0;
    44   const unsigned long ZONE_INTRANET = 1;
    45   const unsigned long ZONE_TRUSTED = 2;
    46   const unsigned long ZONE_INTERNET = 3;
    47   const unsigned long ZONE_RESTRICTED = 4;
    49   /**
    50    * Proxy for IInternetSecurityManager::MapUrlToZone().
    51    *
    52    *   Windows only.
    53    *
    54    * @param aURL
    55    *        URI of the download
    56    * @return Security Zone corresponding to aURL.
    57    */
    58   unsigned long mapUrlToZone(in AString aURL);
    59 };

mercurial