add-third-party-ungoogled.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Add ungoogled-chromium-specific code to third_party/ungoogled/
  2. --- /dev/null
  3. +++ b/third_party/ungoogled/BUILD.gn
  4. @@ -0,0 +1,10 @@
  5. +# Copyright (c) 2018 The ungoogled-chromium Authors. All rights reserved.
  6. +# Use of this source code is governed by a BSD-style license that can be
  7. +# found in the LICENSE file.
  8. +
  9. +component("switches") {
  10. + sources = [
  11. + "ungoogled_switches.h",
  12. + "ungoogled_switches.cc",
  13. + ]
  14. +}
  15. --- /dev/null
  16. +++ b/third_party/ungoogled/ungoogled_switches.cc
  17. @@ -0,0 +1,18 @@
  18. +// Copyright (c) 2018 The ungoogled-chromium Authors. All rights reserved.
  19. +// Use of this source code is governed by a BSD-style license that can be
  20. +// found in the LICENSE file.
  21. +
  22. +#include "third_party/ungoogled/ungoogled_switches.h"
  23. +
  24. +namespace switches {
  25. +
  26. +// Enable fingerprinting deception for getClientRects and getBoundingClientRect
  27. +const char kFingerprintingClientRectsNoise[] = "fingerprinting-client-rects-noise";
  28. +
  29. +// Enable fingerprinting deception for measureText
  30. +const char kFingerprintingCanvasMeasureTextNoise[] = "fingerprinting-canvas-measuretext-noise";
  31. +
  32. +// Enable fingerprinting deception for Canvas image data
  33. +const char kFingerprintingCanvasImageDataNoise[] = "fingerprinting-canvas-image-data-noise";
  34. +
  35. +} // namespace switches
  36. --- /dev/null
  37. +++ b/third_party/ungoogled/ungoogled_switches.h
  38. @@ -0,0 +1,18 @@
  39. +// Copyright (c) 2018 The ungoogled-chromium Authors. All rights reserved.
  40. +// Use of this source code is governed by a BSD-style license that can be
  41. +// found in the LICENSE file.
  42. +
  43. +// Defines all the fingerprinting command-line switches.
  44. +
  45. +#ifndef THIRD_PARTY_UNGOOGLED_FINGERPRINTING_SWITCHES_H_
  46. +#define THIRD_PARTY_UNGOOGLED_FINGERPRINTING_SWITCHES_H_
  47. +
  48. +namespace switches {
  49. +
  50. +extern const char kFingerprintingClientRectsNoise[];
  51. +extern const char kFingerprintingCanvasMeasureTextNoise[];
  52. +extern const char kFingerprintingCanvasImageDataNoise[];
  53. +
  54. +}
  55. +
  56. +#endif // THIRD_PARTY_UNGOOGLED_FINGERPRINTING_SWITCHES_H_