storage/src/Variant_inl.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 * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
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 /**
michael@0 8 * Note: This file is included by Variant.h.
michael@0 9 */
michael@0 10
michael@0 11 #ifndef mozilla_storage_Variant_h__
michael@0 12 #error "Do not include this file directly!"
michael@0 13 #endif
michael@0 14
michael@0 15 namespace mozilla {
michael@0 16 namespace storage {
michael@0 17
michael@0 18 ////////////////////////////////////////////////////////////////////////////////
michael@0 19 //// Variant_base
michael@0 20
michael@0 21 inline NS_IMPL_ADDREF(Variant_base)
michael@0 22 inline NS_IMPL_RELEASE(Variant_base)
michael@0 23 inline NS_IMPL_QUERY_INTERFACE(
michael@0 24 Variant_base,
michael@0 25 nsIVariant
michael@0 26 )
michael@0 27
michael@0 28 ////////////////////////////////////////////////////////////////////////////////
michael@0 29 //// nsIVariant
michael@0 30
michael@0 31 inline
michael@0 32 NS_IMETHODIMP
michael@0 33 Variant_base::GetDataType(uint16_t *_type)
michael@0 34 {
michael@0 35 NS_ENSURE_ARG_POINTER(_type);
michael@0 36 *_type = nsIDataType::VTYPE_VOID;
michael@0 37 return NS_OK;
michael@0 38 }
michael@0 39
michael@0 40 inline
michael@0 41 NS_IMETHODIMP
michael@0 42 Variant_base::GetAsInt32(int32_t *)
michael@0 43 {
michael@0 44 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 45 }
michael@0 46
michael@0 47 inline
michael@0 48 NS_IMETHODIMP
michael@0 49 Variant_base::GetAsInt64(int64_t *)
michael@0 50 {
michael@0 51 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 52 }
michael@0 53
michael@0 54 inline
michael@0 55 NS_IMETHODIMP
michael@0 56 Variant_base::GetAsDouble(double *)
michael@0 57 {
michael@0 58 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 59 }
michael@0 60
michael@0 61 inline
michael@0 62 NS_IMETHODIMP
michael@0 63 Variant_base::GetAsAUTF8String(nsACString &)
michael@0 64 {
michael@0 65 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 66 }
michael@0 67
michael@0 68 inline
michael@0 69 NS_IMETHODIMP
michael@0 70 Variant_base::GetAsAString(nsAString &)
michael@0 71 {
michael@0 72 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 73 }
michael@0 74
michael@0 75 inline
michael@0 76 NS_IMETHODIMP
michael@0 77 Variant_base::GetAsArray(uint16_t *,
michael@0 78 nsIID *,
michael@0 79 uint32_t *,
michael@0 80 void **)
michael@0 81 {
michael@0 82 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 83 }
michael@0 84
michael@0 85 inline
michael@0 86 NS_IMETHODIMP
michael@0 87 Variant_base::GetAsInt8(uint8_t *)
michael@0 88 {
michael@0 89 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 90 }
michael@0 91
michael@0 92 inline
michael@0 93 NS_IMETHODIMP
michael@0 94 Variant_base::GetAsInt16(int16_t *)
michael@0 95 {
michael@0 96 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 97 }
michael@0 98
michael@0 99 inline
michael@0 100 NS_IMETHODIMP
michael@0 101 Variant_base::GetAsUint8(uint8_t *)
michael@0 102 {
michael@0 103 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 104 }
michael@0 105
michael@0 106 inline
michael@0 107 NS_IMETHODIMP
michael@0 108 Variant_base::GetAsUint16(uint16_t *)
michael@0 109 {
michael@0 110 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 111 }
michael@0 112
michael@0 113 inline
michael@0 114 NS_IMETHODIMP
michael@0 115 Variant_base::GetAsUint32(uint32_t *)
michael@0 116 {
michael@0 117 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 118 }
michael@0 119
michael@0 120 inline
michael@0 121 NS_IMETHODIMP
michael@0 122 Variant_base::GetAsUint64(uint64_t *)
michael@0 123 {
michael@0 124 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 125 }
michael@0 126
michael@0 127 inline
michael@0 128 NS_IMETHODIMP
michael@0 129 Variant_base::GetAsFloat(float *)
michael@0 130 {
michael@0 131 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 132 }
michael@0 133
michael@0 134 inline
michael@0 135 NS_IMETHODIMP
michael@0 136 Variant_base::GetAsBool(bool *)
michael@0 137 {
michael@0 138 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 139 }
michael@0 140
michael@0 141 inline
michael@0 142 NS_IMETHODIMP
michael@0 143 Variant_base::GetAsChar(char *)
michael@0 144 {
michael@0 145 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 146 }
michael@0 147
michael@0 148 inline
michael@0 149 NS_IMETHODIMP
michael@0 150 Variant_base::GetAsWChar(char16_t *)
michael@0 151 {
michael@0 152 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 153 }
michael@0 154
michael@0 155 inline
michael@0 156 NS_IMETHODIMP
michael@0 157 Variant_base::GetAsID(nsID *)
michael@0 158 {
michael@0 159 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 160 }
michael@0 161
michael@0 162 inline
michael@0 163 NS_IMETHODIMP
michael@0 164 Variant_base::GetAsDOMString(nsAString &)
michael@0 165 {
michael@0 166 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 167 }
michael@0 168
michael@0 169 inline
michael@0 170 NS_IMETHODIMP
michael@0 171 Variant_base::GetAsString(char **)
michael@0 172 {
michael@0 173 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 174 }
michael@0 175
michael@0 176 inline
michael@0 177 NS_IMETHODIMP
michael@0 178 Variant_base::GetAsWString(char16_t **)
michael@0 179 {
michael@0 180 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 181 }
michael@0 182
michael@0 183 inline
michael@0 184 NS_IMETHODIMP
michael@0 185 Variant_base::GetAsISupports(nsISupports **)
michael@0 186 {
michael@0 187 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 188 }
michael@0 189
michael@0 190 inline
michael@0 191 NS_IMETHODIMP
michael@0 192 Variant_base::GetAsInterface(nsIID **,
michael@0 193 void **)
michael@0 194 {
michael@0 195 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 196 }
michael@0 197
michael@0 198 inline
michael@0 199 NS_IMETHODIMP
michael@0 200 Variant_base::GetAsACString(nsACString &)
michael@0 201 {
michael@0 202 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 203 }
michael@0 204
michael@0 205 inline
michael@0 206 NS_IMETHODIMP
michael@0 207 Variant_base::GetAsStringWithSize(uint32_t *,
michael@0 208 char **)
michael@0 209 {
michael@0 210 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 211 }
michael@0 212
michael@0 213 inline
michael@0 214 NS_IMETHODIMP
michael@0 215 Variant_base::GetAsWStringWithSize(uint32_t *,
michael@0 216 char16_t **)
michael@0 217 {
michael@0 218 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 219 }
michael@0 220
michael@0 221 inline
michael@0 222 NS_IMETHODIMP
michael@0 223 Variant_base::GetAsJSVal(JS::MutableHandle<JS::Value>)
michael@0 224 {
michael@0 225 return NS_ERROR_CANNOT_CONVERT_DATA;
michael@0 226 }
michael@0 227
michael@0 228 } // namespace storage
michael@0 229 } // namespace mozilla

mercurial