intl/locale/public/nsILanguageAtomService.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

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: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 2 *
michael@0 3 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #ifndef nsILanguageAtomService_h_
michael@0 8 #define nsILanguageAtomService_h_
michael@0 9
michael@0 10 /*
michael@0 11 * The nsILanguageAtomService provides a mapping from languages or charsets
michael@0 12 * to language groups, and access to the system locale language.
michael@0 13 */
michael@0 14
michael@0 15 #include "nsISupports.h"
michael@0 16 #include "nsCOMPtr.h"
michael@0 17 #include "nsIAtom.h"
michael@0 18
michael@0 19 #define NS_ILANGUAGEATOMSERVICE_IID \
michael@0 20 {0xAF4C48CF, 0x8F76, 0x4477, \
michael@0 21 { 0xA7, 0x0E, 0xAB, 0x09, 0x74, 0xE2, 0x41, 0xF0 }}
michael@0 22
michael@0 23 #define NS_LANGUAGEATOMSERVICE_CONTRACTID \
michael@0 24 "@mozilla.org/intl/nslanguageatomservice;1"
michael@0 25
michael@0 26 class nsILanguageAtomService : public nsISupports
michael@0 27 {
michael@0 28 public:
michael@0 29 NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILANGUAGEATOMSERVICE_IID)
michael@0 30
michael@0 31 virtual nsIAtom* LookupLanguage(const nsACString &aLanguage,
michael@0 32 nsresult *aError = nullptr) = 0;
michael@0 33 virtual already_AddRefed<nsIAtom>
michael@0 34 LookupCharSet(const char *aCharSet, nsresult *aError = nullptr) = 0;
michael@0 35
michael@0 36 virtual nsIAtom* GetLocaleLanguage(nsresult *aError = nullptr) = 0;
michael@0 37
michael@0 38 virtual nsIAtom* GetLanguageGroup(nsIAtom *aLanguage,
michael@0 39 nsresult *aError = nullptr) = 0;
michael@0 40 };
michael@0 41
michael@0 42 NS_DEFINE_STATIC_IID_ACCESSOR(nsILanguageAtomService,
michael@0 43 NS_ILANGUAGEATOMSERVICE_IID)
michael@0 44
michael@0 45 #endif

mercurial