| 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 COMPONENTS_SYNC_CORE_INTERNAL_COMPONENTS_FACTORY_H_ | 9 #ifndef COMPONENTS_SYNC_CORE_INTERNAL_COMPONENTS_FACTORY_H_ |
| 10 #define COMPONENTS_SYNC_CORE_INTERNAL_COMPONENTS_FACTORY_H_ | 10 #define COMPONENTS_SYNC_CORE_INTERNAL_COMPONENTS_FACTORY_H_ |
| 11 | 11 |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
| 17 #include "components/sync/base/sync_export.h" | |
| 18 #include "components/sync/engine/model_safe_worker.h" | 17 #include "components/sync/engine/model_safe_worker.h" |
| 19 | 18 |
| 20 namespace syncer { | 19 namespace syncer { |
| 21 | 20 |
| 22 class CancelationSignal; | 21 class CancelationSignal; |
| 23 class ExtensionsActivity; | 22 class ExtensionsActivity; |
| 24 class ModelTypeRegistry; | 23 class ModelTypeRegistry; |
| 25 class ServerConnectionManager; | 24 class ServerConnectionManager; |
| 26 class SyncEngineEventListener; | 25 class SyncEngineEventListener; |
| 27 class SyncScheduler; | 26 class SyncScheduler; |
| 28 | 27 |
| 29 namespace sessions { | 28 namespace sessions { |
| 30 class DebugInfoGetter; | 29 class DebugInfoGetter; |
| 31 class SyncSessionContext; | 30 class SyncSessionContext; |
| 32 } | 31 } |
| 33 | 32 |
| 34 namespace syncable { | 33 namespace syncable { |
| 35 class Directory; | 34 class Directory; |
| 36 class DirectoryBackingStore; | 35 class DirectoryBackingStore; |
| 37 } | 36 } |
| 38 | 37 |
| 39 class SYNC_EXPORT InternalComponentsFactory { | 38 class InternalComponentsFactory { |
| 40 public: | 39 public: |
| 41 enum EncryptionMethod { | 40 enum EncryptionMethod { |
| 42 ENCRYPTION_LEGACY, | 41 ENCRYPTION_LEGACY, |
| 43 // Option to enable support for keystore key based encryption. | 42 // Option to enable support for keystore key based encryption. |
| 44 ENCRYPTION_KEYSTORE | 43 ENCRYPTION_KEYSTORE |
| 45 }; | 44 }; |
| 46 | 45 |
| 47 enum BackoffOverride { | 46 enum BackoffOverride { |
| 48 BACKOFF_NORMAL, | 47 BACKOFF_NORMAL, |
| 49 // Use this value for integration testing to avoid long delays / | 48 // Use this value for integration testing to avoid long delays / |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 const base::FilePath& backing_filepath) = 0; | 106 const base::FilePath& backing_filepath) = 0; |
| 108 | 107 |
| 109 // Returns the Switches struct that this object is using as configuration, if | 108 // Returns the Switches struct that this object is using as configuration, if |
| 110 // the implementation is making use of one. | 109 // the implementation is making use of one. |
| 111 virtual Switches GetSwitches() const = 0; | 110 virtual Switches GetSwitches() const = 0; |
| 112 }; | 111 }; |
| 113 | 112 |
| 114 } // namespace syncer | 113 } // namespace syncer |
| 115 | 114 |
| 116 #endif // COMPONENTS_SYNC_CORE_INTERNAL_COMPONENTS_FACTORY_H_ | 115 #endif // COMPONENTS_SYNC_CORE_INTERNAL_COMPONENTS_FACTORY_H_ |
| OLD | NEW |