Bug 1909613 - Enable <details name=''> everywhere, r=emilio
[gecko.git] / netwerk / base / LoadTainting.h
blob11dc8a304f71c9b51bf733998c18849bdad87747
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_LoadTainting_h
8 #define mozilla_LoadTainting_h
10 #include <stdint.h>
12 namespace mozilla {
14 // Define an enumeration to reflect the concept of response tainting from the
15 // the fetch spec:
17 // https://fetch.spec.whatwg.org/#concept-request-response-tainting
19 // Roughly the tainting means:
21 // * Basic: the request resulted in a same-origin or non-http load
22 // * CORS: the request resulted in a cross-origin load with CORS headers
23 // * Opaque: the request resulted in a cross-origin load without CORS headers
25 // The enumeration is purposefully designed such that more restrictive tainting
26 // corresponds to a higher integral value.
27 enum class LoadTainting : uint8_t { Basic = 0, CORS = 1, Opaque = 2 };
29 } // namespace mozilla
31 #endif // mozilla_LoadTainting_h