modules/libpref/public/nsIPrefLocalizedString.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 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "nsISupports.idl"
     8 /**
     9  * The nsIPrefLocalizedString interface is simply a wrapper interface for
    10  * nsISupportsString so the preferences service can have a unique identifier
    11  * to distinguish between requests for normal wide strings (nsISupportsString)
    12  * and "localized" wide strings, which get their default values from properites
    13  * files.
    14  *
    15  * @see nsIPrefBranch
    16  * @see nsISupportsString
    17  */
    19 [scriptable, uuid(ae419e24-1dd1-11b2-b39a-d3e5e7073802)]
    20 interface nsIPrefLocalizedString : nsISupports
    21 {
    22   /**
    23    * Provides access to string data stored in this property.
    24    *
    25    * @throws Error An error occurred.
    26    */
    27   attribute wstring data;
    29   /**
    30    * Used to retrieve the contents of this object into a wide string.
    31    *
    32    * @return wstring The string containing the data stored within this object.
    33    */
    34   wstring toString();
    36   /**
    37    * Used to set the contents of this object.
    38    *
    39    * @param length The length of the string. This value should not include
    40    *               space for the null terminator, nor should it account for the
    41    *               size of a character. It should  only be the number of
    42    *               characters for which there is space in the string.
    43    * @param data   The string data to be stored.
    44    *
    45    * @note
    46    * This makes a copy of the string argument passed in.
    47    */
    48   void setDataWithLength(in unsigned long length,
    49                          [size_is(length)] in wstring data);
    50 };
    52 %{C++
    54 #define NS_PREFLOCALIZEDSTRING_CID                     \
    55   { /* {064d9cee-1dd2-11b2-83e3-d25ab0193c26} */       \
    56     0x064d9cee,                                        \
    57     0x1dd2,                                            \
    58     0x11b2,                                            \
    59     { 0x83, 0xe3, 0xd2, 0x5a, 0xb0, 0x19, 0x3c, 0x26 } \
    60   }
    62 #define NS_PREFLOCALIZEDSTRING_CONTRACTID "@mozilla.org/pref-localizedstring;1"
    64 %}

mercurial