add-components-ungoogled.patch 2.1 KB

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