| 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 #include "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include "chrome/browser/sync/glue/sync_backend_host.h" | 7 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1341 case NOT_INITIALIZED: | 1341 case NOT_INITIALIZED: |
| 1342 // This configuration should result in a download request if the nigori | 1342 // This configuration should result in a download request if the nigori |
| 1343 // type's initial_sync_ended bit is unset. If the download request | 1343 // type's initial_sync_ended bit is unset. If the download request |
| 1344 // contains progress markers, there is a risk that the server will try to | 1344 // contains progress markers, there is a risk that the server will try to |
| 1345 // trigger migration. That would be disastrous, so we must rely on the | 1345 // trigger migration. That would be disastrous, so we must rely on the |
| 1346 // sync manager to ensure that this type never has both progress markers | 1346 // sync manager to ensure that this type never has both progress markers |
| 1347 // and !initial_sync_ended. | 1347 // and !initial_sync_ended. |
| 1348 initialization_state_ = DOWNLOADING_NIGORI; | 1348 initialization_state_ = DOWNLOADING_NIGORI; |
| 1349 ConfigureDataTypes( | 1349 ConfigureDataTypes( |
| 1350 syncer::CONFIGURE_REASON_NEW_CLIENT, | 1350 syncer::CONFIGURE_REASON_NEW_CLIENT, |
| 1351 syncer::ModelTypeSet(syncer::NIGORI), | 1351 syncer::ModelTypeSet(syncer::EarlyDownloadTypes()), |
| 1352 syncer::ModelTypeSet(), | 1352 syncer::ModelTypeSet(), |
| 1353 // Calls back into this function. | 1353 // Calls back into this function. |
| 1354 base::Bind( | 1354 base::Bind( |
| 1355 &SyncBackendHost:: | 1355 &SyncBackendHost:: |
| 1356 HandleNigoriConfigurationCompletedOnFrontendLoop, | 1356 HandleNigoriConfigurationCompletedOnFrontendLoop, |
| 1357 weak_ptr_factory_.GetWeakPtr()), | 1357 weak_ptr_factory_.GetWeakPtr()), |
| 1358 base::Bind(&SyncBackendHost::OnNigoriDownloadRetry, | 1358 base::Bind(&SyncBackendHost::OnNigoriDownloadRetry, |
| 1359 weak_ptr_factory_.GetWeakPtr())); | 1359 weak_ptr_factory_.GetWeakPtr())); |
| 1360 break; | 1360 break; |
| 1361 case DOWNLOADING_NIGORI: | 1361 case DOWNLOADING_NIGORI: |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1539 const syncer::ModelTypeSet failed_configuration_types) { | 1539 const syncer::ModelTypeSet failed_configuration_types) { |
| 1540 HandleInitializationCompletedOnFrontendLoop( | 1540 HandleInitializationCompletedOnFrontendLoop( |
| 1541 failed_configuration_types.Empty()); | 1541 failed_configuration_types.Empty()); |
| 1542 } | 1542 } |
| 1543 | 1543 |
| 1544 #undef SDVLOG | 1544 #undef SDVLOG |
| 1545 | 1545 |
| 1546 #undef SLOG | 1546 #undef SLOG |
| 1547 | 1547 |
| 1548 } // namespace browser_sync | 1548 } // namespace browser_sync |
| OLD | NEW |