diff options
author | rsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-02 08:31:51 +0000 |
---|---|---|
committer | rsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-02 08:31:51 +0000 |
commit | cc7a544c7ed441865a8cabe21409314c857d1831 (patch) | |
tree | ed56e6182e951d985abbe2a10c627565e0d90f7e /sync/sessions | |
parent | dcc72db730c7fb95e9590e01b2e3237d1b13ba98 (diff) | |
download | chromium_src-cc7a544c7ed441865a8cabe21409314c857d1831.zip chromium_src-cc7a544c7ed441865a8cabe21409314c857d1831.tar.gz chromium_src-cc7a544c7ed441865a8cabe21409314c857d1831.tar.bz2 |
[sync] Componentize sync: Part 6: Add more 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_PRIVATE (and some SYNC_EXPORT) annotations to classes / methods
within src/sync so that various chrome targets can reference them.
It also makes a few assorted fixes like adding missing destructors, etc. These
errors get flagged when component builds are enabled after componentizing
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://codereview.chromium.org/11624037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174801 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/sessions')
-rw-r--r-- | sync/sessions/DEPS | 1 | ||||
-rw-r--r-- | sync/sessions/debug_info_getter.h | 5 | ||||
-rw-r--r-- | sync/sessions/ordered_commit_set.h | 5 | ||||
-rw-r--r-- | sync/sessions/status_controller.h | 5 | ||||
-rw-r--r-- | sync/sessions/sync_session.h | 7 | ||||
-rw-r--r-- | sync/sessions/sync_session_context.h | 5 |
6 files changed, 17 insertions, 11 deletions
diff --git a/sync/sessions/DEPS b/sync/sessions/DEPS index bdbefee..57778b0 100644 --- a/sync/sessions/DEPS +++ b/sync/sessions/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+sync/base", "+sync/engine", "+sync/internal_api/public/base", "+sync/internal_api/public/engine", diff --git a/sync/sessions/debug_info_getter.h b/sync/sessions/debug_info_getter.h index c434091..c1536ba 100644 --- a/sync/sessions/debug_info_getter.h +++ b/sync/sessions/debug_info_getter.h @@ -1,10 +1,11 @@ -// 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. #ifndef SYNC_SESSIONS_DEBUG_INFO_GETTER_H_ #define SYNC_SESSIONS_DEBUG_INFO_GETTER_H_ +#include "sync/base/sync_export.h" #include "sync/protocol/sync.pb.h" namespace syncer { @@ -12,7 +13,7 @@ namespace sessions { // This is the interface that needs to be implemented by the event listener // to communicate the debug info data to the syncer. -class DebugInfoGetter { +class SYNC_EXPORT_PRIVATE DebugInfoGetter { public: // Gets the client debug info and clears the state so the same data is not // sent again. diff --git a/sync/sessions/ordered_commit_set.h b/sync/sessions/ordered_commit_set.h index cc6940a..862ee23 100644 --- a/sync/sessions/ordered_commit_set.h +++ b/sync/sessions/ordered_commit_set.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 <set> #include <vector> +#include "sync/base/sync_export.h" #include "sync/internal_api/public/base/model_type.h" #include "sync/internal_api/public/engine/model_safe_worker.h" #include "sync/syncable/syncable_id.h" @@ -19,7 +20,7 @@ namespace sessions { // TODO(ncarter): This code is more generic than just Commit and can // be reused elsewhere (e.g. ChangeReorderBuffer do similar things). Merge // all these implementations. -class OrderedCommitSet { +class SYNC_EXPORT_PRIVATE OrderedCommitSet { public: // A list of indices into the full list of commit ids such that: // 1 - each element is an index belonging to a particular ModelSafeGroup. diff --git a/sync/sessions/status_controller.h b/sync/sessions/status_controller.h index 9e1e73c..bf100b0 100644 --- a/sync/sessions/status_controller.h +++ b/sync/sessions/status_controller.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. @@ -34,13 +34,14 @@ #include "base/logging.h" #include "base/stl_util.h" #include "base/time.h" +#include "sync/base/sync_export.h" #include "sync/internal_api/public/sessions/model_neutral_state.h" #include "sync/sessions/ordered_commit_set.h" namespace syncer { namespace sessions { -class StatusController { +class SYNC_EXPORT_PRIVATE StatusController { public: explicit StatusController(const ModelSafeRoutingInfo& routes); ~StatusController(); diff --git a/sync/sessions/sync_session.h b/sync/sessions/sync_session.h index 58065b7..901e3b5 100644 --- a/sync/sessions/sync_session.h +++ b/sync/sessions/sync_session.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. @@ -23,6 +23,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/time.h" +#include "sync/base/sync_export.h" #include "sync/internal_api/public/base/model_type.h" #include "sync/internal_api/public/engine/model_safe_worker.h" #include "sync/internal_api/public/sessions/sync_session_snapshot.h" @@ -40,12 +41,12 @@ class WriteTransaction; namespace sessions { -class SyncSession { +class SYNC_EXPORT_PRIVATE SyncSession { public: // The Delegate services events that occur during the session requiring an // explicit (and session-global) action, as opposed to events that are simply // recorded in per-session state. - class Delegate { + class SYNC_EXPORT_PRIVATE Delegate { public: // The client was throttled and should cease-and-desist syncing activity // until the specified time. diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h index 16b56be..d47c3e2 100644 --- a/sync/sessions/sync_session_context.h +++ b/sync/sessions/sync_session_context.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. @@ -22,6 +22,7 @@ #include <string> #include <vector> +#include "sync/base/sync_export.h" #include "sync/engine/sync_engine_event.h" #include "sync/engine/syncer_types.h" #include "sync/engine/traffic_recorder.h" @@ -45,7 +46,7 @@ static const int kDefaultMaxCommitBatchSize = 25; namespace sessions { class TestScopedSessionEventListener; -class SyncSessionContext { +class SYNC_EXPORT_PRIVATE SyncSessionContext { public: SyncSessionContext(ServerConnectionManager* connection_manager, syncable::Directory* directory, |