tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

LoadTainting.h (1116B)


      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/. */
      6 
      7 #ifndef mozilla_LoadTainting_h
      8 #define mozilla_LoadTainting_h
      9 
     10 #include <stdint.h>
     11 
     12 namespace mozilla {
     13 
     14 // Define an enumeration to reflect the concept of response tainting from the
     15 // the fetch spec:
     16 //
     17 //  https://fetch.spec.whatwg.org/#concept-request-response-tainting
     18 //
     19 // Roughly the tainting means:
     20 //
     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
     24 //
     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 };
     28 
     29 }  // namespace mozilla
     30 
     31 #endif  // mozilla_LoadTainting_h