Chromium Code Reviews| Index: sync/internal_api/sync_backup_manager.cc |
| diff --git a/sync/internal_api/sync_backup_manager.cc b/sync/internal_api/sync_backup_manager.cc |
| index d421dfd9f1cb39a0685defa07fc346cb65d448ac..def6f037b4ca3ab05181d6bf0ff95aaf0675100b 100644 |
| --- a/sync/internal_api/sync_backup_manager.cc |
| +++ b/sync/internal_api/sync_backup_manager.cc |
| @@ -50,17 +50,21 @@ void SyncBackupManager::Init( |
| report_unrecoverable_error_function, |
| cancelation_signal); |
| - GetUserShare()->directory->CollectMetaHandleCounts( |
| + if (initialized()) { |
|
Nicolas Zea
2014/07/02 18:48:07
nit: I find it clear to do if (!initialized()) ret
haitaol1
2014/07/02 21:42:18
Done.
|
| + GetUserShare()->directory->CollectMetaHandleCounts( |
| &status_.num_entries_by_type, |
| &status_.num_to_delete_entries_by_type); |
| - HideSyncPreference(PRIORITY_PREFERENCES); |
| - HideSyncPreference(PREFERENCES); |
| + HideSyncPreference(PRIORITY_PREFERENCES); |
| + HideSyncPreference(PREFERENCES); |
| + } |
| } |
| void SyncBackupManager::SaveChanges() { |
| - NormalizeEntries(); |
| - GetUserShare()->directory->SaveChanges(); |
| + if (initialized()) { |
| + NormalizeEntries(); |
| + GetUserShare()->directory->SaveChanges(); |
| + } |
| } |
| SyncStatus SyncBackupManager::GetDetailedStatus() const { |