| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_SYNC_BACKEND_MIGRATOR_H_ | 5 #ifndef CHROME_BROWSER_SYNC_BACKEND_MIGRATOR_H_ |
| 6 #define CHROME_BROWSER_SYNC_BACKEND_MIGRATOR_H_ | 6 #define CHROME_BROWSER_SYNC_BACKEND_MIGRATOR_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 syncer::UserShare* user_share, | 51 syncer::UserShare* user_share, |
| 52 ProfileSyncService* service, | 52 ProfileSyncService* service, |
| 53 sync_driver::DataTypeManager* manager, | 53 sync_driver::DataTypeManager* manager, |
| 54 const base::Closure &migration_done_callback); | 54 const base::Closure &migration_done_callback); |
| 55 virtual ~BackendMigrator(); | 55 virtual ~BackendMigrator(); |
| 56 | 56 |
| 57 // Starts a sequence of events that will disable and reenable |types|. | 57 // Starts a sequence of events that will disable and reenable |types|. |
| 58 void MigrateTypes(syncer::ModelTypeSet types); | 58 void MigrateTypes(syncer::ModelTypeSet types); |
| 59 | 59 |
| 60 void AddMigrationObserver(MigrationObserver* observer); | 60 void AddMigrationObserver(MigrationObserver* observer); |
| 61 bool HasMigrationObserver(MigrationObserver* observer) const; | 61 bool HasMigrationObserver(const MigrationObserver* observer) const; |
| 62 void RemoveMigrationObserver(MigrationObserver* observer); | 62 void RemoveMigrationObserver(MigrationObserver* observer); |
| 63 | 63 |
| 64 State state() const; | 64 State state() const; |
| 65 | 65 |
| 66 // Called from ProfileSyncService to notify us of configure done. | 66 // Called from ProfileSyncService to notify us of configure done. |
| 67 // Note: We receive these notificiations only when our state is not IDLE. | 67 // Note: We receive these notificiations only when our state is not IDLE. |
| 68 void OnConfigureDone( | 68 void OnConfigureDone( |
| 69 const sync_driver::DataTypeManager::ConfigureResult& result); | 69 const sync_driver::DataTypeManager::ConfigureResult& result); |
| 70 | 70 |
| 71 // Returns the types that are currently pending migration (if any). | 71 // Returns the types that are currently pending migration (if any). |
| (...skipping 29 matching lines...) Expand all Loading... |
| 101 base::Closure migration_done_callback_; | 101 base::Closure migration_done_callback_; |
| 102 | 102 |
| 103 base::WeakPtrFactory<BackendMigrator> weak_ptr_factory_; | 103 base::WeakPtrFactory<BackendMigrator> weak_ptr_factory_; |
| 104 | 104 |
| 105 DISALLOW_COPY_AND_ASSIGN(BackendMigrator); | 105 DISALLOW_COPY_AND_ASSIGN(BackendMigrator); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 } // namespace browser_sync | 108 } // namespace browser_sync |
| 109 | 109 |
| 110 #endif // CHROME_BROWSER_SYNC_BACKEND_MIGRATOR_H_ | 110 #endif // CHROME_BROWSER_SYNC_BACKEND_MIGRATOR_H_ |
| OLD | NEW |