profile/dirserviceprovider/src/nsProfileStringTypes.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: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     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  * We support two builds of the directory service provider.
     8  * One, linked into the profile component, uses the internal
     9  * string API. The other can be used by standalone embedding
    10  * clients, and uses embed strings.
    11  * To keep the code clean, we are using typedefs to equate
    12  * embed/internal string types. We are also defining some
    13  * internal macros in terms of the embedding strings API.
    14  *
    15  * When modifying the profile directory service provider, be
    16  * sure to use methods supported by both the internal and
    17  * embed strings APIs.
    18  */
    20 #ifndef MOZILLA_INTERNAL_API
    22 #include "nsEmbedString.h"
    24 typedef nsCString nsPromiseFlatCString;
    25 typedef nsCString nsAutoCString;
    27 #define PromiseFlatCString nsCString
    29 #else
    30 #include "nsString.h"
    31 #include "nsPromiseFlatString.h"
    32 #endif

mercurial