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

Unified Diff: sync/internal_api/public/sync_manager_factory.h

Issue 10704214: [Sync] Refactor sync manager into interface. (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/sync_manager_factory.h
diff --git a/sync/internal_api/public/sync_manager_factory.h b/sync/internal_api/public/sync_manager_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..bdcb19d628c1a0cae0edfefc7773432f71014a1e
--- /dev/null
+++ b/sync/internal_api/public/sync_manager_factory.h
@@ -0,0 +1,30 @@
+// 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.
+
+#ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_FACTORY_H_
+#define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_FACTORY_H_
+
+#include <string>
+
+#include "base/memory/scoped_ptr.h"
+
+namespace syncer {
+
+class SyncManager;
+
+// Helper class to allow dependency injection of the SyncManager.
+class SyncManagerFactory {
+ public:
+ SyncManagerFactory();
+ virtual ~SyncManagerFactory();
+
+ virtual scoped_ptr<syncer::SyncManager> CreateSyncManager(std::string name);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SyncManagerFactory);
+};
+
+} // namespace syncer
+
+#endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698