| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ | 6 #define COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // This factory provides sync driver code with the model type specific sync/api | 42 // This factory provides sync driver code with the model type specific sync/api |
| 43 // service (like SyncableService) implementations. | 43 // service (like SyncableService) implementations. |
| 44 class SyncApiComponentFactory { | 44 class SyncApiComponentFactory { |
| 45 public: | 45 public: |
| 46 virtual ~SyncApiComponentFactory() {} | 46 virtual ~SyncApiComponentFactory() {} |
| 47 // Callback to allow platform-specific datatypes to register themselves as | 47 // Callback to allow platform-specific datatypes to register themselves as |
| 48 // data type controllers. | 48 // data type controllers. |
| 49 // |disabled_types| and |enabled_types| control the disable/enable state of | 49 // |disabled_types| and |enabled_types| control the disable/enable state of |
| 50 // types that are on or off by default (respectively). | 50 // types that are on or off by default (respectively). |
| 51 typedef base::Callback<void(SyncService* sync_service, | 51 using RegisterDataTypesMethod = |
| 52 ModelTypeSet disabled_types, | 52 base::Callback<void(SyncService* sync_service, |
| 53 ModelTypeSet enabled_types)> | 53 ModelTypeSet disabled_types, |
| 54 RegisterDataTypesMethod; | 54 ModelTypeSet enabled_types)>; |
| 55 | 55 |
| 56 // The various factory methods for the data type model associators | 56 // The various factory methods for the data type model associators |
| 57 // and change processors all return this struct. This is needed | 57 // and change processors all return this struct. This is needed |
| 58 // because the change processors typically require a type-specific | 58 // because the change processors typically require a type-specific |
| 59 // model associator at construction time. | 59 // model associator at construction time. |
| 60 // | 60 // |
| 61 // Note: This interface is deprecated in favor of the SyncableService API. | 61 // Note: This interface is deprecated in favor of the SyncableService API. |
| 62 // New datatypes that do not live on the UI thread should directly return a | 62 // New datatypes that do not live on the UI thread should directly return a |
| 63 // weak pointer to a SyncableService. All others continue to return | 63 // weak pointer to a SyncableService. All others continue to return |
| 64 // SyncComponents. It is safe to assume that the factory methods below are | 64 // SyncComponents. It is safe to assume that the factory methods below are |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 std::unique_ptr<AttachmentStoreForSync> attachment_store, | 118 std::unique_ptr<AttachmentStoreForSync> attachment_store, |
| 119 const UserShare& user_share, | 119 const UserShare& user_share, |
| 120 const std::string& store_birthday, | 120 const std::string& store_birthday, |
| 121 ModelType model_type, | 121 ModelType model_type, |
| 122 AttachmentService::Delegate* delegate) = 0; | 122 AttachmentService::Delegate* delegate) = 0; |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 } // namespace syncer | 125 } // namespace syncer |
| 126 | 126 |
| 127 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ | 127 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ |
| OLD | NEW |