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: 2 -*- */ |
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 | #ifndef nsDetetctionConfident_h__ |
michael@0 | 6 | #define nsDetetctionConfident_h__ |
michael@0 | 7 | |
michael@0 | 8 | /* |
michael@0 | 9 | This type is used to indicate how confident the detection module about |
michael@0 | 10 | the return result. |
michael@0 | 11 | |
michael@0 | 12 | eNoAnswerYet is used to indicate that the detector have not find out a |
michael@0 | 13 | answer yet based on the data it received. |
michael@0 | 14 | eBestAnswer is used to indicate that the answer the detector returned |
michael@0 | 15 | is the best one within the knowledge of the detector. |
michael@0 | 16 | In other words, the test to all other candidcates fail. |
michael@0 | 17 | |
michael@0 | 18 | For example, the (Shift_JIS/EUC-JP/ISO-2022-JP) detection |
michael@0 | 19 | module may return this with answer "Shift_JIS "if it receive |
michael@0 | 20 | bytes > 0x80 (which make ISO-2022-JP test failed) and byte |
michael@0 | 21 | 0x82 (which may EUC-JP test failed) |
michael@0 | 22 | |
michael@0 | 23 | eSureAnswer is used to indicate that the detector is 100% sure about the |
michael@0 | 24 | answer. |
michael@0 | 25 | Exmaple 1; the Shift_JIS/ISO-2022-JP/EUC-JP detector return |
michael@0 | 26 | this w/ ISO-2022-JP when it hit one of the following ESC seq |
michael@0 | 27 | ESC ( J |
michael@0 | 28 | ESC $ @ |
michael@0 | 29 | ESC $ B |
michael@0 | 30 | Example 2: the detector which can detect UCS2 return w/ UCS2 |
michael@0 | 31 | when the first 2 byte are BOM mark. |
michael@0 | 32 | Example 3: the Korean detector return ISO-2022-KR when it |
michael@0 | 33 | hit ESC $ ) C |
michael@0 | 34 | |
michael@0 | 35 | */ |
michael@0 | 36 | typedef enum { |
michael@0 | 37 | eNoAnswerYet = 0, |
michael@0 | 38 | eBestAnswer, |
michael@0 | 39 | eSureAnswer, |
michael@0 | 40 | eNoAnswerMatch |
michael@0 | 41 | } nsDetectionConfident; |
michael@0 | 42 | |
michael@0 | 43 | #endif /* nsDetetctionConfident_h__ */ |