summaryrefslogtreecommitdiffstats
path: root/sync/base
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-18 22:45:30 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-18 22:45:30 +0000
commitfaece5bc8aa4e868f49731892c83d74b958224d7 (patch)
treec17065b8d30779bdc896913503dd9b8b8939c2ed /sync/base
parent883e3af8929fb934c78e212a1c06872a962789e3 (diff)
downloadchromium_src-faece5bc8aa4e868f49731892c83d74b958224d7.zip
chromium_src-faece5bc8aa4e868f49731892c83d74b958224d7.tar.gz
chromium_src-faece5bc8aa4e868f49731892c83d74b958224d7.tar.bz2
[Sync] Add sync_export.h (Step 1 for componentizing sync)
Add SYNC_EXPORT{,_PRIVATE} annotations to stuff in internal_api/public/{base,engine} in the 'sync' target. Add some componentization-related TODOs. Annotate sync-related test executables with SYNC_TEST. BUG=136928 TEST= Review URL: https://chromiumcodereview.appspot.com/10700180 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147325 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/base')
-rw-r--r--sync/base/DEPS2
-rw-r--r--sync/base/sync_export.h41
2 files changed, 43 insertions, 0 deletions
diff --git a/sync/base/DEPS b/sync/base/DEPS
new file mode 100644
index 0000000..48e8875
--- /dev/null
+++ b/sync/base/DEPS
@@ -0,0 +1,2 @@
+include_rules = [
+]
diff --git a/sync/base/sync_export.h b/sync/base/sync_export.h
new file mode 100644
index 0000000..a38e8b2
--- /dev/null
+++ b/sync/base/sync_export.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2012 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 SYNC_SYNC_EXPORT_H_
+#define SYNC_SYNC_EXPORT_H_
+
+// TODO(akalin): Remove '0 && ' when sync becomes a component.
+#if 0 && defined(COMPONENT_BUILD)
+#if defined(WIN32)
+
+#if defined(SYNC_IMPLEMENTATION)
+#define SYNC_EXPORT __declspec(dllexport)
+#define SYNC_EXPORT_PRIVATE __declspec(dllexport)
+#elif defined(SYNC_TEST)
+#define SYNC_EXPORT __declspec(dllimport)
+#define SYNC_EXPORT_PRIVATE __declspec(dllimport)
+#else
+#define SYNC_EXPORT __declspec(dllimport)
+#define SYNC_EXPORT_PRIVATE
+#endif // defined(SYNC_IMPLEMENTATION)
+
+#else // defined(WIN32)
+#if defined(SYNC_IMPLEMENTATION)
+#define SYNC_EXPORT __attribute__((visibility("default")))
+#define SYNC_EXPORT_PRIVATE __attribute__((visibility("default")))
+#elif defined(SYNC_TEST)
+#define SYNC_EXPORT
+#define SYNC_EXPORT_PRIVATE __attribute__((visibility("default")))
+#else
+#define SYNC_EXPORT
+#define SYNC_EXPORT_PRIVATE
+#endif // defined(SYNC_IMPLEMENTATION)
+#endif
+
+#else // defined(COMPONENT_BUILD)
+#define SYNC_EXPORT
+#define SYNC_EXPORT_PRIVATE
+#endif
+
+#endif // SYNC_SYNC_EXPORT_H_