diff options
author | rsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 23:47:42 +0000 |
---|---|---|
committer | rsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 23:47:42 +0000 |
commit | aa166d02133c942de7498ebab60a47de2827f3df (patch) | |
tree | 6d617d623d0a6b361ee4bf21728a5467a87ed613 /sync/api | |
parent | ce507cbf2a4c50d83855f08f8717df736584338b (diff) | |
download | chromium_src-aa166d02133c942de7498ebab60a47de2827f3df.zip chromium_src-aa166d02133c942de7498ebab60a47de2827f3df.tar.gz chromium_src-aa166d02133c942de7498ebab60a47de2827f3df.tar.bz2 |
[sync] Componentize sync: Part 2: Add SYNC_EXPORTs to files in src/sync/
One of the long term goals of the sync team is to pull sync code out of
chrome.dll and into its own component. As of today, several chrome targets
depend on various sync targets as defined in sync.gyp. We'd like to move
to a world where all chrome targets outside sync.gyp simply depend on the
target sync.gyp:sync, which is built into its own component.
This patch sets the stage for full componentization by adding
SYNC_EXPORT annotations to classes / methods within src/sync.
The final step of breaking off sync into its own component will be done
in https://codereview.chromium.org/11412211.
BUG=136928
Review URL: https://chromiumcodereview.appspot.com/11515009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172458 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/api')
-rw-r--r-- | sync/api/DEPS | 1 | ||||
-rw-r--r-- | sync/api/sync_change.h | 5 | ||||
-rw-r--r-- | sync/api/sync_change_processor.h | 5 | ||||
-rw-r--r-- | sync/api/sync_data.h | 5 | ||||
-rw-r--r-- | sync/api/sync_error.h | 5 | ||||
-rw-r--r-- | sync/api/sync_error_factory.h | 5 | ||||
-rw-r--r-- | sync/api/sync_merge_result.h | 5 | ||||
-rw-r--r-- | sync/api/syncable_service.h | 8 |
8 files changed, 24 insertions, 15 deletions
diff --git a/sync/api/DEPS b/sync/api/DEPS index c3b8bac..c526c08 100644 --- a/sync/api/DEPS +++ b/sync/api/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+sync/base", "+sync/internal_api/base_node.h", "+sync/internal_api/public", "+sync/protocol", diff --git a/sync/api/sync_change.h b/sync/api/sync_change.h index d519cfe..50becf4 100644 --- a/sync/api/sync_change.h +++ b/sync/api/sync_change.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 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. @@ -11,6 +11,7 @@ #include "base/location.h" #include "sync/api/sync_data.h" +#include "sync/base/sync_export.h" namespace syncer { @@ -19,7 +20,7 @@ namespace syncer { // is encapsulated within the SyncChange, which, once created, is immutable. // Note: it is safe and cheap to pass these by value or make copies, as they do // not create deep copies of their internal data. -class SyncChange { +class SYNC_EXPORT SyncChange { public: enum SyncChangeType { ACTION_INVALID, diff --git a/sync/api/sync_change_processor.h b/sync/api/sync_change_processor.h index ad7c6d1..c2dad3f 100644 --- a/sync/api/sync_change_processor.h +++ b/sync/api/sync_change_processor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 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. @@ -8,6 +8,7 @@ #include <vector> #include "sync/api/sync_error.h" +#include "sync/base/sync_export.h" namespace tracked_objects { class Location; @@ -20,7 +21,7 @@ class SyncChange; typedef std::vector<SyncChange> SyncChangeList; // An interface for services that handle receiving SyncChanges. -class SyncChangeProcessor { +class SYNC_EXPORT SyncChangeProcessor { public: SyncChangeProcessor(); virtual ~SyncChangeProcessor(); diff --git a/sync/api/sync_data.h b/sync/api/sync_data.h index b88e0e7..c3404c3 100644 --- a/sync/api/sync_data.h +++ b/sync/api/sync_data.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 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. @@ -10,6 +10,7 @@ #include <vector> #include "base/basictypes.h" +#include "sync/base/sync_export.h" #include "sync/internal_api/public/base/model_type.h" #include "sync/internal_api/public/util/immutable.h" @@ -22,7 +23,7 @@ namespace syncer { // A light-weight container for immutable sync data. Pass-by-value and storage // in STL containers are supported and encouraged if helpful. -class SyncData { +class SYNC_EXPORT SyncData { public: // Creates an empty and invalid SyncData. SyncData(); diff --git a/sync/api/sync_error.h b/sync/api/sync_error.h index c674993..a3382b4 100644 --- a/sync/api/sync_error.h +++ b/sync/api/sync_error.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 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. @@ -9,6 +9,7 @@ #include <string> #include "base/memory/scoped_ptr.h" +#include "sync/base/sync_export.h" #include "sync/internal_api/public/base/model_type.h" namespace tracked_objects { @@ -22,7 +23,7 @@ namespace syncer { // unrecoverable for the datatype creating them, and should only be used as // such. // This class is copy-friendly and thread-safe. -class SyncError { +class SYNC_EXPORT SyncError { public: // Default constructor refers to "no error", and IsSet() will return false. SyncError(); diff --git a/sync/api/sync_error_factory.h b/sync/api/sync_error_factory.h index 39fab50..9b306b7 100644 --- a/sync/api/sync_error_factory.h +++ b/sync/api/sync_error_factory.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 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. @@ -9,10 +9,11 @@ #include "base/location.h" #include "sync/api/sync_error.h" +#include "sync/base/sync_export.h" namespace syncer { -class SyncErrorFactory { +class SYNC_EXPORT SyncErrorFactory { public: SyncErrorFactory(); virtual ~SyncErrorFactory(); diff --git a/sync/api/sync_merge_result.h b/sync/api/sync_merge_result.h index baa4eb4..4ffd474 100644 --- a/sync/api/sync_merge_result.h +++ b/sync/api/sync_merge_result.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 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. @@ -6,6 +6,7 @@ #define SYNC_API_SYNC_MERGE_RESULT_H_ #include "sync/api/sync_error.h" +#include "sync/base/sync_export.h" #include "sync/internal_api/public/base/model_type.h" namespace syncer { @@ -17,7 +18,7 @@ namespace syncer { // by the local SyncableService, all values correspond to the local state before // and after merging, and the delta's applied to that state. Sync's change // processor will create a separate merge result. -class SyncMergeResult { +class SYNC_EXPORT SyncMergeResult { public: // Initialize an empty merge result for model type |type|. explicit SyncMergeResult(ModelType type); diff --git a/sync/api/syncable_service.h b/sync/api/syncable_service.h index 571c2e7..8d187fc 100644 --- a/sync/api/syncable_service.h +++ b/sync/api/syncable_service.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 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. @@ -14,6 +14,7 @@ #include "sync/api/sync_data.h" #include "sync/api/sync_error.h" #include "sync/api/sync_merge_result.h" +#include "sync/base/sync_export.h" #include "sync/internal_api/public/base/model_type.h" namespace syncer { @@ -25,8 +26,9 @@ typedef std::vector<SyncData> SyncDataList; // TODO(zea): remove SupportsWeakPtr in favor of having all SyncableService // implementers provide a way of getting a weak pointer to themselves. // See crbug.com/100114. -class SyncableService : public SyncChangeProcessor, - public base::SupportsWeakPtr<SyncableService> { +class SYNC_EXPORT SyncableService + : public SyncChangeProcessor, + public base::SupportsWeakPtr<SyncableService> { public: // Informs the service to begin syncing the specified synced datatype |type|. // The service should then merge |initial_sync_data| into it's local data, |