summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-10-24 03:05:05 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-10-24 03:05:05 -0700
commit008a72709c6a2c8e00996025f72e49776b27f414 (patch)
tree97a0521fea476931561883408b88d96cd8b57fd7
parenta9e4cb016c4bc9a182b5da4f5662c36e14b689f4 (diff)
parentcd7ce18ede8128e5c7a10cbc96c9ab197a4999b0 (diff)
downloadexternal_chromium-008a72709c6a2c8e00996025f72e49776b27f414.zip
external_chromium-008a72709c6a2c8e00996025f72e49776b27f414.tar.gz
external_chromium-008a72709c6a2c8e00996025f72e49776b27f414.tar.bz2
am cd7ce18e: Part of fix for bug 5455901 adding net_export.h
* commit 'cd7ce18ede8128e5c7a10cbc96c9ab197a4999b0': Part of fix for bug 5455901 adding net_export.h
-rw-r--r--net/base/net_export.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/net/base/net_export.h b/net/base/net_export.h
new file mode 100644
index 0000000..f212d20
--- /dev/null
+++ b/net/base/net_export.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_BASE_NET_EXPORT_H_
+#define NET_BASE_NET_EXPORT_H_
+#pragma once
+
+// Defines NET_EXPORT so that functionality implemented by the net module can
+// be exported to consumers, and NET_EXPORT_PRIVATE that allows unit tests to
+// access features not intended to be used directly by real consumers.
+
+#if defined(COMPONENT_BUILD)
+#if defined(WIN32)
+
+#if defined(NET_IMPLEMENTATION)
+#define NET_EXPORT __declspec(dllexport)
+#define NET_EXPORT_PRIVATE __declspec(dllexport)
+#else
+#define NET_EXPORT __declspec(dllimport)
+#define NET_EXPORT_PRIVATE __declspec(dllimport)
+#endif // defined(NET_IMPLEMENTATION)
+
+#else // defined(WIN32)
+#define NET_EXPORT __attribute__((visibility("default")))
+#define NET_EXPORT_PRIVATE __attribute__((visibility("default")))
+#endif
+
+#else /// defined(COMPONENT_BUILD)
+#define NET_EXPORT
+#define NET_EXPORT_PRIVATE
+#endif
+
+#endif // NET_BASE_NET_EXPORT_H_