OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SYNC_SYNC_EXPORT_H_ | 5 #ifndef SYNC_SYNC_EXPORT_H_ |
6 #define SYNC_SYNC_EXPORT_H_ | 6 #define SYNC_SYNC_EXPORT_H_ |
7 | 7 |
8 // TODO(akalin): Remove '0 && ' when sync becomes a component. | 8 // Notes: |
9 #if 0 && defined(COMPONENT_BUILD) | 9 // 1) To make a symbol accessible from 'sync_unit_tests', but hidden from |
10 // chrome components like 'browser', or from chrome test suites like | |
11 // 'unit_tests' or 'sync_integration_tests', use SYNC_EXPORT_PRIVATE. | |
12 // 2) To make a symbol accessible from chrome components, chrome test suites, | |
13 // and 'sync_unit_tests', use SYNC_EXPORT. | |
14 // 3) Typically, if you need to add a 'sync/*' entry to a DEPS file outside | |
15 // 'sync/', you will also need to export the class being used. Otherwise, you | |
16 // may see linker errors with a component build. | |
17 // See http://www.chromium.org/developers/how-tos/component-build for more info. | |
18 // TODO(rsimha): Include a link to a doc on sync componentization. | |
Ryan Sleevi
2013/01/23 04:06:21
Is this comment necessary? Does it deviate at all
Raghu Simha
2013/01/23 08:04:06
This is the same API as the other FOO_EXPORTs. Tim
| |
19 | |
20 #if defined(COMPONENT_BUILD) | |
10 #if defined(WIN32) | 21 #if defined(WIN32) |
11 | 22 |
12 #if defined(SYNC_IMPLEMENTATION) | 23 #if defined(SYNC_IMPLEMENTATION) |
13 #define SYNC_EXPORT __declspec(dllexport) | 24 #define SYNC_EXPORT __declspec(dllexport) |
14 #define SYNC_EXPORT_PRIVATE __declspec(dllexport) | 25 #define SYNC_EXPORT_PRIVATE __declspec(dllexport) |
15 #elif defined(SYNC_TEST) | 26 #elif defined(SYNC_TEST) |
16 #define SYNC_EXPORT __declspec(dllimport) | 27 #define SYNC_EXPORT __declspec(dllimport) |
17 #define SYNC_EXPORT_PRIVATE __declspec(dllimport) | 28 #define SYNC_EXPORT_PRIVATE __declspec(dllimport) |
18 #else | 29 #else |
19 #define SYNC_EXPORT __declspec(dllimport) | 30 #define SYNC_EXPORT __declspec(dllimport) |
(...skipping 12 matching lines...) Expand all Loading... | |
32 #define SYNC_EXPORT_PRIVATE | 43 #define SYNC_EXPORT_PRIVATE |
33 #endif // defined(SYNC_IMPLEMENTATION) | 44 #endif // defined(SYNC_IMPLEMENTATION) |
34 #endif | 45 #endif |
35 | 46 |
36 #else // defined(COMPONENT_BUILD) | 47 #else // defined(COMPONENT_BUILD) |
37 #define SYNC_EXPORT | 48 #define SYNC_EXPORT |
38 #define SYNC_EXPORT_PRIVATE | 49 #define SYNC_EXPORT_PRIVATE |
39 #endif | 50 #endif |
40 | 51 |
41 #endif // SYNC_SYNC_EXPORT_H_ | 52 #endif // SYNC_SYNC_EXPORT_H_ |
OLD | NEW |