CefReferrerPolicy.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //
  2. // This file manually written from cef/include/internal/cef_types.h.
  3. // C API name: cef_referrer_policy_t.
  4. //
  5. namespace Xilium.CefGlue
  6. {
  7. /// <summary>
  8. /// Policy for how the Referrer HTTP header value will be sent during navigation.
  9. /// If the `--no-referrers` command-line flag is specified then the policy value
  10. /// will be ignored and the Referrer value will never be sent.
  11. /// Must be kept synchronized with net::URLRequest::ReferrerPolicy from Chromium.
  12. /// </summary>
  13. public enum CefReferrerPolicy
  14. {
  15. /// <summary>
  16. /// Clear the referrer header if the header value is HTTPS but the request
  17. /// destination is HTTP. This is the default behavior.
  18. /// </summary>
  19. ClearReferrerOnTransitionFromSecureToInsecure,
  20. /// <summary>
  21. /// Default policy (same as CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE).
  22. /// </summary>
  23. Default =
  24. ClearReferrerOnTransitionFromSecureToInsecure,
  25. /// <summary>
  26. /// A slight variant on CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE:
  27. /// If the request destination is HTTP, an HTTPS referrer will be cleared. If
  28. /// the request's destination is cross-origin with the referrer (but does not
  29. /// downgrade), the referrer's granularity will be stripped down to an origin
  30. /// rather than a full URL. Same-origin requests will send the full referrer.
  31. /// </summary>
  32. ReduceReferrerGranularityOnTransitionCrossOrigin,
  33. /// <summary>
  34. /// Strip the referrer down to an origin when the origin of the referrer is
  35. /// different from the destination's origin.
  36. /// </summary>
  37. OriginOnlyOnTransitionCrossOrigin,
  38. /// <summary>
  39. /// Never change the referrer.
  40. /// </summary>
  41. NeverClearReferrer,
  42. /// <summary>
  43. /// Strip the referrer down to the origin regardless of the redirect location.
  44. /// </summary>
  45. Origin,
  46. /// <summary>
  47. /// Clear the referrer when the request's referrer is cross-origin with the
  48. /// request's destination.
  49. /// </summary>
  50. ClearReferrerOnTransitionCrossOrigin,
  51. /// <summary>
  52. /// Strip the referrer down to the origin, but clear it entirely if the
  53. /// referrer value is HTTPS and the destination is HTTP.
  54. /// </summary>
  55. OriginClearOnTransitionFromSecureToInsecure,
  56. /// <summary>
  57. /// Always clear the referrer regardless of the request destination.
  58. /// </summary>
  59. NoReferrer,
  60. // Always the last value in this enumeration.
  61. LastValue = NoReferrer,
  62. }
  63. }