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 "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | %{C++ |
michael@0 | 9 | #define NSILOCALE_COLLATE "NSILOCALE_COLLATE" |
michael@0 | 10 | #define NSILOCALE_CTYPE "NSILOCALE_CTYPE" |
michael@0 | 11 | #define NSILOCALE_MONETARY "NSILOCALE_MONETARY" |
michael@0 | 12 | #define NSILOCALE_NUMERIC "NSILOCALE_NUMERIC" |
michael@0 | 13 | #define NSILOCALE_TIME "NSILOCALE_TIME" |
michael@0 | 14 | #define NSILOCALE_MESSAGE "NSILOCALE_MESSAGES" |
michael@0 | 15 | |
michael@0 | 16 | #define NS_LOCALE_CONTRACTID "@mozilla.org/intl/nslocale;1" |
michael@0 | 17 | %} |
michael@0 | 18 | |
michael@0 | 19 | /** |
michael@0 | 20 | * Represents one locale, which can be used for things like sorting text strings |
michael@0 | 21 | * and formatting numbers, dates and times. |
michael@0 | 22 | */ |
michael@0 | 23 | [scriptable, uuid(21035ee0-4556-11d3-91cd-00105aa3f7dc)] |
michael@0 | 24 | interface nsILocale : nsISupports |
michael@0 | 25 | { |
michael@0 | 26 | /** |
michael@0 | 27 | * Get the locale code for a given category. |
michael@0 | 28 | * |
michael@0 | 29 | * A locale code is of the form language[-COUNTRY[-region]], where |
michael@0 | 30 | * "language" is an ISO 639 language code (two letter codes preferred over |
michael@0 | 31 | * three letter codes when available), "COUNTRY" is an ISO 3166 two letter |
michael@0 | 32 | * country code, and "region" is a string of up to 5 letters. |
michael@0 | 33 | * |
michael@0 | 34 | * A category is one of the following: |
michael@0 | 35 | * NSILOCALE_CTYPE: Character classification and case conversion. |
michael@0 | 36 | * NSILOCALE_COLLATE: Collation order. How strings are sorted. |
michael@0 | 37 | * NSILOCALE_MONETARY: Monetary formatting. |
michael@0 | 38 | * NSILOCALE_NUMERIC: Numeric, non-monetary formatting. |
michael@0 | 39 | * NSILOCALE_TIME: Date and time formats. |
michael@0 | 40 | * NSILOCALE_MESSAGES: Related to fonts, character encodings etc. |
michael@0 | 41 | * |
michael@0 | 42 | * @param category |
michael@0 | 43 | * The category of interest. |
michael@0 | 44 | * @return The locale code to be used for the given category. |
michael@0 | 45 | */ |
michael@0 | 46 | AString getCategory(in AString category); |
michael@0 | 47 | }; |