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 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
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 "nsIUnicharInputStream.idl" |
michael@0 | 7 | |
michael@0 | 8 | interface nsIInputStream; |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * A unichar input stream that wraps an input stream. |
michael@0 | 12 | * This allows reading unicode strings from a stream, automatically converting |
michael@0 | 13 | * the bytes from a selected character encoding. |
michael@0 | 14 | */ |
michael@0 | 15 | [scriptable, uuid(FC66FFB6-5404-4908-A4A3-27F92FA0579D)] |
michael@0 | 16 | interface nsIConverterInputStream : nsIUnicharInputStream { |
michael@0 | 17 | /** |
michael@0 | 18 | * Default replacement char value, U+FFFD REPLACEMENT CHARACTER. |
michael@0 | 19 | */ |
michael@0 | 20 | const char16_t DEFAULT_REPLACEMENT_CHARACTER = 0xFFFD; |
michael@0 | 21 | |
michael@0 | 22 | /** |
michael@0 | 23 | * Initialize this stream. |
michael@0 | 24 | * @param aStream |
michael@0 | 25 | * The underlying stream to read from. |
michael@0 | 26 | * @param aCharset |
michael@0 | 27 | * The character encoding to use for converting the bytes of the |
michael@0 | 28 | * stream. A null charset will be interpreted as UTF-8. |
michael@0 | 29 | * @param aBufferSize |
michael@0 | 30 | * How many bytes to buffer. |
michael@0 | 31 | * @param aReplacementChar |
michael@0 | 32 | * The character to replace unknown byte sequences in the stream |
michael@0 | 33 | * with. The standard replacement character is U+FFFD. |
michael@0 | 34 | * A value of 0x0000 will cause an exception to be thrown if unknown |
michael@0 | 35 | * byte sequences are encountered in the stream. |
michael@0 | 36 | */ |
michael@0 | 37 | void init (in nsIInputStream aStream, in string aCharset, |
michael@0 | 38 | in long aBufferSize, in char16_t aReplacementChar); |
michael@0 | 39 | }; |
michael@0 | 40 |