Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: sync/internal_api/public/engine/model_safe_worker.h

Issue 10700180: [Sync] Add sync_export.h (Step 1 for componentizing sync) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sync/internal_api/public/engine/model_safe_worker.h
diff --git a/sync/internal_api/public/engine/model_safe_worker.h b/sync/internal_api/public/engine/model_safe_worker.h
index 193e41d1004e6520c8846cec89dda04ce9426a10..9f1c7020d9a7ceba46407f100ccc9e08060ed263 100644
--- a/sync/internal_api/public/engine/model_safe_worker.h
+++ b/sync/internal_api/public/engine/model_safe_worker.h
@@ -11,6 +11,7 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
+#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/internal_api/public/util/syncer_error.h"
@@ -21,6 +22,9 @@ class DictionaryValue;
namespace syncer {
+// TODO(akalin): Move the non-exported functions in this file to a
+// private header.
+
typedef base::Callback<enum SyncerError(void)> WorkCallback;
enum ModelSafeGroup {
@@ -38,7 +42,7 @@ enum ModelSafeGroup {
MODEL_SAFE_GROUP_COUNT,
};
-std::string ModelSafeGroupToString(ModelSafeGroup group);
+SYNC_EXPORT std::string ModelSafeGroupToString(ModelSafeGroup group);
// The Syncer uses a ModelSafeWorker for all tasks that could potentially
// modify syncable entries (e.g under a WriteTransaction). The ModelSafeWorker
@@ -47,7 +51,8 @@ std::string ModelSafeGroupToString(ModelSafeGroup group);
// is guaranteed to be "model-safe", where "safe" refers to not allowing us to
// cause an embedding application model to fall out of sync with the
// syncable::Directory due to a race.
-class ModelSafeWorker : public base::RefCountedThreadSafe<ModelSafeWorker> {
+class SYNC_EXPORT ModelSafeWorker
+ : public base::RefCountedThreadSafe<ModelSafeWorker> {
public:
// Any time the Syncer performs model modifications (e.g employing a
// WriteTransaction), it should be done by this method to ensure it is done
@@ -73,7 +78,7 @@ typedef std::map<syncer::ModelType, ModelSafeGroup>
base::DictionaryValue* ModelSafeRoutingInfoToValue(
const ModelSafeRoutingInfo& routing_info);
-std::string ModelSafeRoutingInfoToString(
+SYNC_EXPORT std::string ModelSafeRoutingInfoToString(
const ModelSafeRoutingInfo& routing_info);
// Make a ModelTypePayloadMap for all the enabled types in a
@@ -82,11 +87,12 @@ syncer::ModelTypePayloadMap ModelSafeRoutingInfoToPayloadMap(
const ModelSafeRoutingInfo& routes,
const std::string& payload);
-syncer::ModelTypeSet GetRoutingInfoTypes(
+SYNC_EXPORT syncer::ModelTypeSet GetRoutingInfoTypes(
const ModelSafeRoutingInfo& routing_info);
-ModelSafeGroup GetGroupForModelType(const syncer::ModelType type,
- const ModelSafeRoutingInfo& routes);
+SYNC_EXPORT ModelSafeGroup GetGroupForModelType(
+ const syncer::ModelType type,
+ const ModelSafeRoutingInfo& routes);
} // namespace syncer
« no previous file with comments | « sync/internal_api/public/base/model_type_payload_map.h ('k') | sync/internal_api/public/engine/passive_model_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698