| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <utility> | 10 #include <utility> |
| 11 |
| 10 #include "base/task.h" | 12 #include "base/task.h" |
| 11 #include "chrome/browser/sync/glue/change_processor.h" | 13 #include "chrome/browser/sync/glue/change_processor.h" |
| 12 #include "chrome/browser/sync/glue/data_type_controller.h" | 14 #include "chrome/browser/sync/glue/data_type_controller.h" |
| 13 #include "chrome/browser/sync/glue/model_associator.h" | 15 #include "chrome/browser/sync/glue/model_associator.h" |
| 14 #include "chrome/browser/sync/unrecoverable_error_handler.h" | 16 #include "chrome/browser/sync/unrecoverable_error_handler.h" |
| 15 | 17 |
| 16 class PersonalDataManager; | 18 class PersonalDataManager; |
| 17 class PasswordStore; | 19 class PasswordStore; |
| 18 class ProfileSyncService; | 20 class ProfileSyncService; |
| 19 class WebDatabase; | 21 class WebDatabase; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 41 SyncComponents(browser_sync::AssociatorInterface* ma, | 43 SyncComponents(browser_sync::AssociatorInterface* ma, |
| 42 browser_sync::ChangeProcessor* cp) | 44 browser_sync::ChangeProcessor* cp) |
| 43 : model_associator(ma), change_processor(cp) {} | 45 : model_associator(ma), change_processor(cp) {} |
| 44 }; | 46 }; |
| 45 | 47 |
| 46 virtual ~ProfileSyncFactory() {} | 48 virtual ~ProfileSyncFactory() {} |
| 47 | 49 |
| 48 // Instantiates and initializes a new ProfileSyncService. Enabled | 50 // Instantiates and initializes a new ProfileSyncService. Enabled |
| 49 // data types are registered with the service. The return pointer | 51 // data types are registered with the service. The return pointer |
| 50 // is owned by the caller. | 52 // is owned by the caller. |
| 51 virtual ProfileSyncService* CreateProfileSyncService() = 0; | 53 virtual ProfileSyncService* CreateProfileSyncService( |
| 54 const std::string& cros_user) = 0; |
| 52 | 55 |
| 53 // Instantiates a new DataTypeManager with a SyncBackendHost and a | 56 // Instantiates a new DataTypeManager with a SyncBackendHost and a |
| 54 // list of data type controllers. The return pointer is owned by | 57 // list of data type controllers. The return pointer is owned by |
| 55 // the caller. | 58 // the caller. |
| 56 virtual browser_sync::DataTypeManager* CreateDataTypeManager( | 59 virtual browser_sync::DataTypeManager* CreateDataTypeManager( |
| 57 browser_sync::SyncBackendHost* backend, | 60 browser_sync::SyncBackendHost* backend, |
| 58 const browser_sync::DataTypeController::TypeMap& controllers) = 0; | 61 const browser_sync::DataTypeController::TypeMap& controllers) = 0; |
| 59 | 62 |
| 60 // Instantiates both a model associator and change processor for the | 63 // Instantiates both a model associator and change processor for the |
| 61 // app data type. The pointers in the return struct are | 64 // app data type. The pointers in the return struct are |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 122 |
| 120 // Instantiates both a model associator and change processor for the | 123 // Instantiates both a model associator and change processor for the |
| 121 // session data type. The pointers in the return struct are | 124 // session data type. The pointers in the return struct are |
| 122 // owned by the caller. | 125 // owned by the caller. |
| 123 virtual SyncComponents CreateSessionSyncComponents( | 126 virtual SyncComponents CreateSessionSyncComponents( |
| 124 ProfileSyncService* profile_sync_service, | 127 ProfileSyncService* profile_sync_service, |
| 125 browser_sync::UnrecoverableErrorHandler* error_handler) = 0; | 128 browser_sync::UnrecoverableErrorHandler* error_handler) = 0; |
| 126 }; | 129 }; |
| 127 | 130 |
| 128 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_H__ | 131 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_H__ |
| OLD | NEW |