policy_proto_export.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Copyright 2014 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. #ifndef COMPONENTS_POLICY_PROTO_POLICY_PROTO_EXPORT_H_
  5. #define COMPONENTS_POLICY_PROTO_POLICY_PROTO_EXPORT_H_
  6. #if defined(COMPONENT_BUILD)
  7. #if defined(WIN32)
  8. #if defined(POLICY_PROTO_COMPILATION)
  9. #define POLICY_PROTO_EXPORT __declspec(dllexport)
  10. #else
  11. #define POLICY_PROTO_EXPORT __declspec(dllimport)
  12. #endif // defined(POLICY_PROTO_COMPILATION)
  13. #if defined(POLICY_CHROME_SETTINGS_PROTO_COMPILATION)
  14. #define POLICY_CHROME_SETTINGS_PROTO_EXPORT __declspec(dllexport)
  15. #else
  16. #define POLICY_CHROME_SETTINGS_PROTO_EXPORT __declspec(dllimport)
  17. #endif // defined(POLICY_PROTO_COMPILATION)
  18. #else // defined(WIN32)
  19. #if defined(POLICY_PROTO_COMPILATION)
  20. #define POLICY_PROTO_EXPORT __attribute__((visibility("default")))
  21. #else
  22. #define POLICY_PROTO_EXPORT
  23. #endif // defined(POLICY_PROTO_COMPILATION)
  24. #if defined(POLICY_CHROME_SETTINGS_PROTO_COMPILATION)
  25. #define POLICY_CHROME_SETTINGS_PROTO_EXPORT \
  26. __attribute__((visibility("default")))
  27. #else
  28. #define POLICY_CHROME_SETTINGS_PROTO_EXPORT
  29. #endif // defined(POLICY_PROTO_COMPILATION)
  30. #endif // defined(WIN32)
  31. #else // defined(COMPONENT_BUILD)
  32. #define POLICY_PROTO_EXPORT
  33. #define POLICY_CHROME_SETTINGS_PROTO_EXPORT
  34. #endif // defined(COMPONENT_BUILD)
  35. #endif // COMPONENTS_POLICY_PROTO_POLICY_PROTO_EXPORT_H_