summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-10-13 17:52:51 +0100
committerKristian Monsen <kristianm@google.com>2011-10-21 12:31:00 +0100
commitcd7ce18ede8128e5c7a10cbc96c9ab197a4999b0 (patch)
tree97a0521fea476931561883408b88d96cd8b57fd7 /net
parenteaa86de4aa5278c05c8f4798a564a26ad2b1b0bc (diff)
downloadexternal_chromium-cd7ce18ede8128e5c7a10cbc96c9ab197a4999b0.zip
external_chromium-cd7ce18ede8128e5c7a10cbc96c9ab197a4999b0.tar.gz
external_chromium-cd7ce18ede8128e5c7a10cbc96c9ab197a4999b0.tar.bz2
Part of fix for bug 5455901 adding net_export.h
Adding net/base/net_export as it is in ToT chromium. Change-Id: Ia6e36b981854b26cf4ccdb315941dfb05aea0ff4
Diffstat (limited to 'net')
-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_