diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-11 03:11:06 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-11 03:11:06 +0000 |
commit | f8197029e47adb3512609ec18f5aa7f3059befd3 (patch) | |
tree | 55aca64c9cf27ff7a9dc0cbc3a401ae27692dfba /sync/internal_api/public | |
parent | 2db1e9f2c1502d384c9e5f849cfc85eec7875787 (diff) | |
download | chromium_src-f8197029e47adb3512609ec18f5aa7f3059befd3.zip chromium_src-f8197029e47adb3512609ec18f5aa7f3059befd3.tar.gz chromium_src-f8197029e47adb3512609ec18f5aa7f3059befd3.tar.bz2 |
sync: Consistently refcount ModelSafeWorkers
Certain interfaces in sync had signatures that included vectors of raw
pointers to ModelSafeWorkers. The use of raw pointers to refcounted
objects looks a lot like a bug waiting to happen.
This CL replaces any use of std::vector<ModelSafeWorker*> with
std::vector<scoped_refptr<ModelSafeWorker> >. This is not expected to
alter sync behavior in any significant way.
BUG=332251
Review URL: https://codereview.chromium.org/130193002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244329 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public')
5 files changed, 5 insertions, 5 deletions
diff --git a/sync/internal_api/public/internal_components_factory.h b/sync/internal_api/public/internal_components_factory.h index 616457d..ada376a 100644 --- a/sync/internal_api/public/internal_components_factory.h +++ b/sync/internal_api/public/internal_components_factory.h @@ -82,7 +82,7 @@ class SYNC_EXPORT InternalComponentsFactory { virtual scoped_ptr<sessions::SyncSessionContext> BuildContext( ServerConnectionManager* connection_manager, syncable::Directory* directory, - const std::vector<ModelSafeWorker*>& workers, + const std::vector<scoped_refptr<ModelSafeWorker> >& workers, ExtensionsActivity* extensions_activity, const std::vector<SyncEngineEventListener*>& listeners, sessions::DebugInfoGetter* debug_info_getter, diff --git a/sync/internal_api/public/internal_components_factory_impl.h b/sync/internal_api/public/internal_components_factory_impl.h index 7b5c697..128383e 100644 --- a/sync/internal_api/public/internal_components_factory_impl.h +++ b/sync/internal_api/public/internal_components_factory_impl.h @@ -27,7 +27,7 @@ class SYNC_EXPORT InternalComponentsFactoryImpl virtual scoped_ptr<sessions::SyncSessionContext> BuildContext( ServerConnectionManager* connection_manager, syncable::Directory* directory, - const std::vector<ModelSafeWorker*>& workers, + const std::vector<scoped_refptr<ModelSafeWorker> >& workers, ExtensionsActivity* extensions_activity, const std::vector<SyncEngineEventListener*>& listeners, sessions::DebugInfoGetter* debug_info_getter, diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h index a5e6926..fdf41b6 100644 --- a/sync/internal_api/public/sync_manager.h +++ b/sync/internal_api/public/sync_manager.h @@ -311,7 +311,7 @@ class SYNC_EXPORT SyncManager : public syncer::InvalidationHandler { int sync_server_port, bool use_ssl, scoped_ptr<HttpPostProviderFactory> post_factory, - const std::vector<ModelSafeWorker*>& workers, + const std::vector<scoped_refptr<ModelSafeWorker> >& workers, ExtensionsActivity* extensions_activity, ChangeDelegate* change_delegate, const SyncCredentials& credentials, diff --git a/sync/internal_api/public/test/fake_sync_manager.h b/sync/internal_api/public/test/fake_sync_manager.h index a6e7b47..41dee19 100644 --- a/sync/internal_api/public/test/fake_sync_manager.h +++ b/sync/internal_api/public/test/fake_sync_manager.h @@ -81,7 +81,7 @@ class FakeSyncManager : public SyncManager { int sync_server_port, bool use_ssl, scoped_ptr<HttpPostProviderFactory> post_factory, - const std::vector<ModelSafeWorker*>& workers, + const std::vector<scoped_refptr<ModelSafeWorker> >& workers, ExtensionsActivity* extensions_activity, ChangeDelegate* change_delegate, const SyncCredentials& credentials, diff --git a/sync/internal_api/public/test/test_internal_components_factory.h b/sync/internal_api/public/test/test_internal_components_factory.h index c899676..c68218b7 100644 --- a/sync/internal_api/public/test/test_internal_components_factory.h +++ b/sync/internal_api/public/test/test_internal_components_factory.h @@ -33,7 +33,7 @@ class TestInternalComponentsFactory : public InternalComponentsFactory { virtual scoped_ptr<sessions::SyncSessionContext> BuildContext( ServerConnectionManager* connection_manager, syncable::Directory* directory, - const std::vector<ModelSafeWorker*>& workers, + const std::vector<scoped_refptr<ModelSafeWorker> >& workers, ExtensionsActivity* monitor, const std::vector<SyncEngineEventListener*>& listeners, sessions::DebugInfoGetter* debug_info_getter, |