diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-17 20:12:15 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-17 20:12:15 +0000 |
commit | ceffdf01e68f732b0aa5731274dbf3d32a27ffde (patch) | |
tree | 22976ce293d7bdfd20871a2d1f28524d441157cf /sync/internal_api/sync_manager_factory.cc | |
parent | 3cf1e5d278ee73b5c3365b35614091858b9f5d1a (diff) | |
download | chromium_src-ceffdf01e68f732b0aa5731274dbf3d32a27ffde.zip chromium_src-ceffdf01e68f732b0aa5731274dbf3d32a27ffde.tar.gz chromium_src-ceffdf01e68f732b0aa5731274dbf3d32a27ffde.tar.bz2 |
[Sync] Refactor sync manager into interface.
sync_manager.h now defines a pure interface. The actual implementation is
in sync_manager_impl.h/cc. In order to support this, we also create a
SyncManagerFactory, which allows us to dependency inject a SyncManager
implementation into the SyncBackendHost. Follow up patches will
make use of this injection, as well as split the SyncManager tests
out of syncapi_unittest.
R=akalin@chromium.org
BUG=133061
TEST=
Review URL: https://chromiumcodereview.appspot.com/10704214
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147076 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/sync_manager_factory.cc')
-rw-r--r-- | sync/internal_api/sync_manager_factory.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sync/internal_api/sync_manager_factory.cc b/sync/internal_api/sync_manager_factory.cc new file mode 100644 index 0000000..9d784b4 --- /dev/null +++ b/sync/internal_api/sync_manager_factory.cc @@ -0,0 +1,22 @@ +// Copyright (c) 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. + +#include "sync/internal_api/public/sync_manager_factory.h" + +#include "sync/internal_api/sync_manager_impl.h" + +namespace syncer { + +SyncManagerFactory::SyncManagerFactory() { +} + +SyncManagerFactory::~SyncManagerFactory() { +} + +scoped_ptr<SyncManager> SyncManagerFactory::CreateSyncManager( + const std::string name) { + return scoped_ptr<SyncManager>(new SyncManagerImpl(name)); +} + +} // namespace syncer |