xpcom/build/nsXREAppData.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /* -*- Mode: C++; tab-width: 2; 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
michael@0 6 #ifndef nsXREAppData_h
michael@0 7 #define nsXREAppData_h
michael@0 8
michael@0 9 #include <stdint.h>
michael@0 10
michael@0 11 class nsIFile;
michael@0 12
michael@0 13 /**
michael@0 14 * Application-specific data needed to start the apprunner.
michael@0 15 *
michael@0 16 * @note When this structure is allocated and manipulated by XRE_CreateAppData,
michael@0 17 * string fields will be allocated with NS_Alloc, and interface pointers
michael@0 18 * are strong references.
michael@0 19 */
michael@0 20 struct nsXREAppData
michael@0 21 {
michael@0 22 /**
michael@0 23 * This should be set to sizeof(nsXREAppData). This structure may be
michael@0 24 * extended in future releases, and this ensures that binary compatibility
michael@0 25 * is maintained.
michael@0 26 */
michael@0 27 uint32_t size;
michael@0 28
michael@0 29 /**
michael@0 30 * The directory of the application to be run. May be null if the
michael@0 31 * xulrunner and the app are installed into the same directory.
michael@0 32 */
michael@0 33 nsIFile* directory;
michael@0 34
michael@0 35 /**
michael@0 36 * The name of the application vendor. This must be ASCII, and is normally
michael@0 37 * mixed-case, e.g. "Mozilla". Optional (may be null), but highly
michael@0 38 * recommended. Must not be the empty string.
michael@0 39 */
michael@0 40 const char *vendor;
michael@0 41
michael@0 42 /**
michael@0 43 * The name of the application. This must be ASCII, and is normally
michael@0 44 * mixed-case, e.g. "Firefox". Required (must not be null or an empty
michael@0 45 * string).
michael@0 46 */
michael@0 47 const char *name;
michael@0 48
michael@0 49 /**
michael@0 50 * The major version, e.g. "0.8.0+". Optional (may be null), but
michael@0 51 * required for advanced application features such as the extension
michael@0 52 * manager and update service. Must not be the empty string.
michael@0 53 */
michael@0 54 const char *version;
michael@0 55
michael@0 56 /**
michael@0 57 * The application's build identifier, e.g. "2004051604"
michael@0 58 */
michael@0 59 const char *buildID;
michael@0 60
michael@0 61 /**
michael@0 62 * The application's UUID. Used by the extension manager to determine
michael@0 63 * compatible extensions. Optional, but required for advanced application
michael@0 64 * features such as the extension manager and update service.
michael@0 65 *
michael@0 66 * This has traditionally been in the form
michael@0 67 * "{AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE}" but for new applications
michael@0 68 * a more readable form is encouraged: "appname@vendor.tld". Only
michael@0 69 * the following characters are allowed: a-z A-Z 0-9 - . @ _ { } *
michael@0 70 */
michael@0 71 const char *ID;
michael@0 72
michael@0 73 /**
michael@0 74 * The copyright information to print for the -h commandline flag,
michael@0 75 * e.g. "Copyright (c) 2003 mozilla.org".
michael@0 76 */
michael@0 77 const char *copyright;
michael@0 78
michael@0 79 /**
michael@0 80 * Combination of NS_XRE_ prefixed flags (defined below).
michael@0 81 */
michael@0 82 uint32_t flags;
michael@0 83
michael@0 84 /**
michael@0 85 * The location of the XRE. XRE_main may not be able to figure this out
michael@0 86 * programatically.
michael@0 87 */
michael@0 88 nsIFile* xreDirectory;
michael@0 89
michael@0 90 /**
michael@0 91 * The minimum/maximum compatible XRE version.
michael@0 92 */
michael@0 93 const char *minVersion;
michael@0 94 const char *maxVersion;
michael@0 95
michael@0 96 /**
michael@0 97 * The server URL to send crash reports to.
michael@0 98 */
michael@0 99 const char *crashReporterURL;
michael@0 100
michael@0 101 /**
michael@0 102 * The profile directory that will be used. Optional (may be null). Must not
michael@0 103 * be the empty string, must be ASCII. The path is split into components
michael@0 104 * along the path separator characters '/' and '\'.
michael@0 105 *
michael@0 106 * The application data directory ("UAppData", see below) is normally
michael@0 107 * composed as follows, where $HOME is platform-specific:
michael@0 108 *
michael@0 109 * UAppData = $HOME[/$vendor]/$name
michael@0 110 *
michael@0 111 * If present, the 'profile' string will be used instead of the combination of
michael@0 112 * vendor and name as follows:
michael@0 113 *
michael@0 114 * UAppData = $HOME/$profile
michael@0 115 */
michael@0 116 const char *profile;
michael@0 117
michael@0 118 /**
michael@0 119 * The application name to use in the User Agent string.
michael@0 120 */
michael@0 121 const char *UAName;
michael@0 122 };
michael@0 123
michael@0 124 /**
michael@0 125 * Indicates whether or not the profile migrator service may be
michael@0 126 * invoked at startup when creating a profile.
michael@0 127 */
michael@0 128 #define NS_XRE_ENABLE_PROFILE_MIGRATOR (1 << 1)
michael@0 129
michael@0 130 /**
michael@0 131 * Indicates whether or not the extension manager service should be
michael@0 132 * initialized at startup.
michael@0 133 */
michael@0 134 #define NS_XRE_ENABLE_EXTENSION_MANAGER (1 << 2)
michael@0 135
michael@0 136 /**
michael@0 137 * Indicates whether or not to use Breakpad crash reporting.
michael@0 138 */
michael@0 139 #define NS_XRE_ENABLE_CRASH_REPORTER (1 << 3)
michael@0 140
michael@0 141 #endif // nsXREAppData_h

mercurial