intl/uconv/ucvcn/nsUnicodeToHZ.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.

     1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6  /**
     7  * A character set converter from Unicode to GBK.
     8  * 
     9  *
    10  * @created         08/Sept/1999
    11  * @author  Yueheng Xu, Yueheng.Xu@intel.com
    12  */
    14 #ifndef nsUnicodeToHZ_h___
    15 #define nsUnicodeToHZ_h___
    17 #include "nsUCSupport.h"
    18 #include "nsGBKConvUtil.h"
    19 //----------------------------------------------------------------------
    20 // Class nsUnicodeToHZ [declaration]
    22 class nsUnicodeToHZ: public nsEncoderSupport
    23 {
    24 public:
    26   /**
    27    * Class constructor.
    28    */
    29   nsUnicodeToHZ();
    31 protected:
    33   //--------------------------------------------------------------------
    34   // Subclassing of nsEncoderSupport class [declaration]
    35   NS_IMETHOD ConvertNoBuff(const char16_t * aSrc, 
    36                             int32_t * aSrcLength, 
    37                             char * aDest, 
    38                             int32_t * aDestLength);
    40   NS_IMETHOD FinishNoBuff(char * aDest, int32_t * aDestLength);
    42   NS_IMETHOD ConvertNoBuffNoErr(const char16_t * aSrc, int32_t * aSrcLength, 
    43                                 char * aDest, int32_t * aDestLength)
    44   {
    45     return NS_OK;
    46   }  // just make it not abstract;
    48   uint16_t mHZState;
    49 protected:
    50   nsGBKConvUtil mUtil;
    53 };
    55 #endif /* nsUnicodeToHZ_h___ */

mercurial