| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // InternalComponentsFactory exists so that tests can override creation of | 5 // InternalComponentsFactory exists so that tests can override creation of |
| 6 // components used by the SyncManager that are not exposed across the sync | 6 // components used by the SyncManager that are not exposed across the sync |
| 7 // API boundary. | 7 // API boundary. |
| 8 | 8 |
| 9 #ifndef SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_H_ | 9 #ifndef SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_H_ |
| 10 #define SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_H_ | 10 #define SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_H_ |
| 11 | 11 |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 16 #include "sync/base/sync_export.h" | 16 #include "sync/base/sync_export.h" |
| 17 #include "sync/internal_api/public/engine/model_safe_worker.h" | 17 #include "sync/internal_api/public/engine/model_safe_worker.h" |
| 18 | 18 |
| 19 namespace syncer { | 19 namespace syncer { |
| 20 | 20 |
| 21 class ExtensionsActivity; | 21 class ExtensionsActivity; |
| 22 class ServerConnectionManager; | 22 class ServerConnectionManager; |
| 23 class SyncEngineEventListener; | 23 class SyncEngineEventListener; |
| 24 class CancelationSignal; | |
| 25 class SyncScheduler; | 24 class SyncScheduler; |
| 26 class TrafficRecorder; | 25 class TrafficRecorder; |
| 27 | 26 |
| 28 namespace sessions { | 27 namespace sessions { |
| 29 class DebugInfoGetter; | 28 class DebugInfoGetter; |
| 30 class SyncSessionContext; | 29 class SyncSessionContext; |
| 31 } | 30 } |
| 32 | 31 |
| 33 namespace syncable { | 32 namespace syncable { |
| 34 class Directory; | 33 class Directory; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 struct Switches { | 68 struct Switches { |
| 70 EncryptionMethod encryption_method; | 69 EncryptionMethod encryption_method; |
| 71 BackoffOverride backoff_override; | 70 BackoffOverride backoff_override; |
| 72 PreCommitUpdatesPolicy pre_commit_updates_policy; | 71 PreCommitUpdatesPolicy pre_commit_updates_policy; |
| 73 }; | 72 }; |
| 74 | 73 |
| 75 virtual ~InternalComponentsFactory() {} | 74 virtual ~InternalComponentsFactory() {} |
| 76 | 75 |
| 77 virtual scoped_ptr<SyncScheduler> BuildScheduler( | 76 virtual scoped_ptr<SyncScheduler> BuildScheduler( |
| 78 const std::string& name, | 77 const std::string& name, |
| 79 sessions::SyncSessionContext* context, | 78 sessions::SyncSessionContext* context) = 0; |
| 80 CancelationSignal* cancelation_signal) = 0; | |
| 81 | 79 |
| 82 virtual scoped_ptr<sessions::SyncSessionContext> BuildContext( | 80 virtual scoped_ptr<sessions::SyncSessionContext> BuildContext( |
| 83 ServerConnectionManager* connection_manager, | 81 ServerConnectionManager* connection_manager, |
| 84 syncable::Directory* directory, | 82 syncable::Directory* directory, |
| 85 const std::vector<ModelSafeWorker*>& workers, | 83 const std::vector<ModelSafeWorker*>& workers, |
| 86 ExtensionsActivity* extensions_activity, | 84 ExtensionsActivity* extensions_activity, |
| 87 const std::vector<SyncEngineEventListener*>& listeners, | 85 const std::vector<SyncEngineEventListener*>& listeners, |
| 88 sessions::DebugInfoGetter* debug_info_getter, | 86 sessions::DebugInfoGetter* debug_info_getter, |
| 89 TrafficRecorder* traffic_recorder, | 87 TrafficRecorder* traffic_recorder, |
| 90 const std::string& invalidator_client_id) = 0; | 88 const std::string& invalidator_client_id) = 0; |
| 91 | 89 |
| 92 virtual scoped_ptr<syncable::DirectoryBackingStore> | 90 virtual scoped_ptr<syncable::DirectoryBackingStore> |
| 93 BuildDirectoryBackingStore( | 91 BuildDirectoryBackingStore( |
| 94 const std::string& dir_name, | 92 const std::string& dir_name, |
| 95 const base::FilePath& backing_filepath) = 0; | 93 const base::FilePath& backing_filepath) = 0; |
| 96 | 94 |
| 97 // Returns the Switches struct that this object is using as configuration, if | 95 // Returns the Switches struct that this object is using as configuration, if |
| 98 // the implementation is making use of one. | 96 // the implementation is making use of one. |
| 99 virtual Switches GetSwitches() const = 0; | 97 virtual Switches GetSwitches() const = 0; |
| 100 }; | 98 }; |
| 101 | 99 |
| 102 } // namespace syncer | 100 } // namespace syncer |
| 103 | 101 |
| 104 #endif // SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_H_ | 102 #endif // SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_H_ |
| OLD | NEW |