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 #include "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 registrar_.workers[GROUP_PASSWORD] = NULL; | 244 registrar_.workers[GROUP_PASSWORD] = NULL; |
245 registrar_.workers.erase(GROUP_DB); | 245 registrar_.workers.erase(GROUP_DB); |
246 registrar_.workers.erase(GROUP_HISTORY); | 246 registrar_.workers.erase(GROUP_HISTORY); |
247 registrar_.workers.erase(GROUP_UI); | 247 registrar_.workers.erase(GROUP_UI); |
248 registrar_.workers.erase(GROUP_PASSIVE); | 248 registrar_.workers.erase(GROUP_PASSIVE); |
249 registrar_.workers.erase(GROUP_PASSWORD); | 249 registrar_.workers.erase(GROUP_PASSWORD); |
250 frontend_ = NULL; | 250 frontend_ = NULL; |
251 core_ = NULL; // Releases reference to core_. | 251 core_ = NULL; // Releases reference to core_. |
252 } | 252 } |
253 | 253 |
| 254 syncable::Directory::PersistedKernelInfo::AutofillMigrationState |
| 255 SyncBackendHost::GetAutofillMigrationState() { |
| 256 return core_->syncapi()->GetAutofillMigrationState(); |
| 257 } |
| 258 |
| 259 void SyncBackendHost::SetAutofillMigrationState( |
| 260 syncable::Directory::PersistedKernelInfo::AutofillMigrationState state) { |
| 261 return core_->syncapi()->SetAutofillMigrationState(state); |
| 262 } |
| 263 |
| 264 syncable::AutofillMigrationDebugInfo |
| 265 SyncBackendHost::GetAutofillMigrationDebugInfo() { |
| 266 return core_->syncapi()->GetAutofillMigrationDebugInfo(); |
| 267 } |
| 268 |
| 269 void SyncBackendHost::SetAutofillMigrationDebugInfo( |
| 270 syncable::AutofillMigrationDebugInfo::PropertyToSet property_to_set, |
| 271 const syncable::AutofillMigrationDebugInfo& info) { |
| 272 return core_->syncapi()->SetAutofillMigrationDebugInfo(property_to_set, info); |
| 273 } |
| 274 |
254 void SyncBackendHost::ConfigureDataTypes(const syncable::ModelTypeSet& types, | 275 void SyncBackendHost::ConfigureDataTypes(const syncable::ModelTypeSet& types, |
255 CancelableTask* ready_task) { | 276 CancelableTask* ready_task) { |
256 // Only one configure is allowed at a time. | 277 // Only one configure is allowed at a time. |
257 DCHECK(!configure_ready_task_.get()); | 278 DCHECK(!configure_ready_task_.get()); |
258 DCHECK(syncapi_initialized_); | 279 DCHECK(syncapi_initialized_); |
259 | 280 |
| 281 core_->syncapi()->ConfigureAutofillMigration(); |
| 282 |
260 bool deleted_type = false; | 283 bool deleted_type = false; |
261 | 284 |
262 { | 285 { |
263 AutoLock lock(registrar_lock_); | 286 AutoLock lock(registrar_lock_); |
264 for (DataTypeController::TypeMap::const_iterator it = | 287 for (DataTypeController::TypeMap::const_iterator it = |
265 data_type_controllers_.begin(); | 288 data_type_controllers_.begin(); |
266 it != data_type_controllers_.end(); ++it) { | 289 it != data_type_controllers_.end(); ++it) { |
267 syncable::ModelType type = (*it).first; | 290 syncable::ModelType type = (*it).first; |
268 | 291 |
269 // If a type is not specified, remove it from the routing_info. | 292 // If a type is not specified, remove it from the routing_info. |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 } | 841 } |
819 | 842 |
820 void SyncBackendHost::Core::DeleteSyncDataFolder() { | 843 void SyncBackendHost::Core::DeleteSyncDataFolder() { |
821 if (file_util::DirectoryExists(host_->sync_data_folder_path())) { | 844 if (file_util::DirectoryExists(host_->sync_data_folder_path())) { |
822 if (!file_util::Delete(host_->sync_data_folder_path(), true)) | 845 if (!file_util::Delete(host_->sync_data_folder_path(), true)) |
823 LOG(DFATAL) << "Could not delete the Sync Data folder."; | 846 LOG(DFATAL) << "Could not delete the Sync Data folder."; |
824 } | 847 } |
825 } | 848 } |
826 | 849 |
827 } // namespace browser_sync | 850 } // namespace browser_sync |
OLD | NEW |