BUILD.gn 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Copyright 2016 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/buildflag_header.gni")
  5. import("//components/safe_browsing/buildflags.gni")
  6. buildflag_header("buildflags") {
  7. header = "buildflags.h"
  8. flags = []
  9. # FULL_SAFE_BROWSING means "are all Safe Browsing features available?"
  10. # This is true only for desktop OSes.
  11. #
  12. # SAFE_BROWSING_AVAILABLE means "are any Safe Browsing features available?"
  13. # This is true only for desktop OSes or Android.
  14. #
  15. # SAFE_BROWSING_DB_LOCAL means "are SB databases available locally?"
  16. # This is true only for desktop OSes.
  17. #
  18. # SAFE_BROWSING_DB_REMOTE means "are SB databases available via GMS Core?"
  19. # This is true only for Android.
  20. #
  21. if (safe_browsing_mode == 0) {
  22. flags += [ "FULL_SAFE_BROWSING=0" ]
  23. flags += [ "SAFE_BROWSING_AVAILABLE=0" ]
  24. flags += [ "SAFE_BROWSING_DB_LOCAL=0" ]
  25. flags += [ "SAFE_BROWSING_DB_REMOTE=0" ]
  26. } else if (safe_browsing_mode == 1) {
  27. flags += [ "FULL_SAFE_BROWSING=1" ]
  28. flags += [ "SAFE_BROWSING_AVAILABLE=1" ]
  29. flags += [ "SAFE_BROWSING_DB_LOCAL=1" ]
  30. flags += [ "SAFE_BROWSING_DB_REMOTE=0" ]
  31. } else if (safe_browsing_mode == 2) {
  32. flags += [ "FULL_SAFE_BROWSING=0" ]
  33. flags += [ "SAFE_BROWSING_AVAILABLE=1" ]
  34. flags += [ "SAFE_BROWSING_DB_LOCAL=0" ]
  35. flags += [ "SAFE_BROWSING_DB_REMOTE=1" ]
  36. }
  37. }