| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_H__ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_H__ |
| 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_H__ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_H__ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 40 struct SyncComponents { | 40 struct SyncComponents { |
| 41 browser_sync::AssociatorInterface* model_associator; | 41 browser_sync::AssociatorInterface* model_associator; |
| 42 browser_sync::ChangeProcessor* change_processor; | 42 browser_sync::ChangeProcessor* change_processor; |
| 43 SyncComponents(browser_sync::AssociatorInterface* ma, | 43 SyncComponents(browser_sync::AssociatorInterface* ma, |
| 44 browser_sync::ChangeProcessor* cp) | 44 browser_sync::ChangeProcessor* cp) |
| 45 : model_associator(ma), change_processor(cp) {} | 45 : model_associator(ma), change_processor(cp) {} |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 virtual ~ProfileSyncFactory() {} | 48 virtual ~ProfileSyncFactory() {} |
| 49 | 49 |
| 50 // Instantiates and initializes a new ProfileSyncService. Enabled | 50 // Instantiates a new ProfileSyncService. The return pointer is owned by the |
| 51 // data types are registered with the service. The return pointer | 51 // caller. |
| 52 // is owned by the caller. | |
| 53 virtual ProfileSyncService* CreateProfileSyncService( | 52 virtual ProfileSyncService* CreateProfileSyncService( |
| 54 const std::string& cros_user) = 0; | 53 const std::string& cros_user) = 0; |
| 55 | 54 |
| 55 // Creates and registers enabled datatypes with the provided |
| 56 // ProfileSyncService. |
| 57 virtual void RegisterDataTypes(ProfileSyncService* pss) = 0; |
| 58 |
| 56 // Instantiates a new DataTypeManager with a SyncBackendHost and a | 59 // Instantiates a new DataTypeManager with a SyncBackendHost and a |
| 57 // list of data type controllers. The return pointer is owned by | 60 // list of data type controllers. The return pointer is owned by |
| 58 // the caller. | 61 // the caller. |
| 59 virtual browser_sync::DataTypeManager* CreateDataTypeManager( | 62 virtual browser_sync::DataTypeManager* CreateDataTypeManager( |
| 60 browser_sync::SyncBackendHost* backend, | 63 browser_sync::SyncBackendHost* backend, |
| 61 const browser_sync::DataTypeController::TypeMap& controllers) = 0; | 64 const browser_sync::DataTypeController::TypeMap& controllers) = 0; |
| 62 | 65 |
| 63 // Instantiates both a model associator and change processor for the | 66 // Instantiates both a model associator and change processor for the |
| 64 // app data type. The pointers in the return struct are | 67 // app data type. The pointers in the return struct are |
| 65 // owned by the caller. | 68 // owned by the caller. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 134 |
| 132 // Instantiates both a model associator and change processor for the | 135 // Instantiates both a model associator and change processor for the |
| 133 // session data type. The pointers in the return struct are | 136 // session data type. The pointers in the return struct are |
| 134 // owned by the caller. | 137 // owned by the caller. |
| 135 virtual SyncComponents CreateSessionSyncComponents( | 138 virtual SyncComponents CreateSessionSyncComponents( |
| 136 ProfileSyncService* profile_sync_service, | 139 ProfileSyncService* profile_sync_service, |
| 137 browser_sync::UnrecoverableErrorHandler* error_handler) = 0; | 140 browser_sync::UnrecoverableErrorHandler* error_handler) = 0; |
| 138 }; | 141 }; |
| 139 | 142 |
| 140 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_H__ | 143 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_H__ |
| OLD | NEW |