Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /* vim:set expandtab ts=4 sw=4 sts=4 cin: */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | /** |
michael@0 | 9 | * An interface that allows writing unicode data. |
michael@0 | 10 | */ |
michael@0 | 11 | [scriptable, uuid(2d00b1bb-8b21-4a63-bcc6-7213f513ac2e)] |
michael@0 | 12 | interface nsIUnicharOutputStream : nsISupports |
michael@0 | 13 | { |
michael@0 | 14 | /** |
michael@0 | 15 | * Write a single character to the stream. When writing many characters, |
michael@0 | 16 | * prefer the string-taking write method. |
michael@0 | 17 | * |
michael@0 | 18 | * @retval true The character was written successfully |
michael@0 | 19 | * @retval false Not all bytes of the character could be written. |
michael@0 | 20 | */ |
michael@0 | 21 | boolean write(in unsigned long aCount, |
michael@0 | 22 | [const, array, size_is(aCount)] in char16_t c); |
michael@0 | 23 | |
michael@0 | 24 | /** |
michael@0 | 25 | * Write a string to the stream. |
michael@0 | 26 | * |
michael@0 | 27 | * @retval true The string was written successfully |
michael@0 | 28 | * @retval false Not all bytes of the string could be written. |
michael@0 | 29 | */ |
michael@0 | 30 | boolean writeString(in AString str); |
michael@0 | 31 | |
michael@0 | 32 | /** |
michael@0 | 33 | * Flush the stream. This finishes the conversion and writes any bytes that |
michael@0 | 34 | * finish the current byte sequence. |
michael@0 | 35 | * |
michael@0 | 36 | * It does NOT flush the underlying stream. |
michael@0 | 37 | * |
michael@0 | 38 | * @see nsIUnicodeEncoder::Finish |
michael@0 | 39 | */ |
michael@0 | 40 | void flush(); |
michael@0 | 41 | |
michael@0 | 42 | /** |
michael@0 | 43 | * Close the stream and free associated resources. This also closes the |
michael@0 | 44 | * underlying stream. |
michael@0 | 45 | */ |
michael@0 | 46 | void close(); |
michael@0 | 47 | }; |