| 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 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1356 case NOT_INITIALIZED: | 1356 case NOT_INITIALIZED: |
| 1357 // This configuration should result in a download request if the nigori | 1357 // This configuration should result in a download request if the nigori |
| 1358 // type's initial_sync_ended bit is unset. If the download request | 1358 // type's initial_sync_ended bit is unset. If the download request |
| 1359 // contains progress markers, there is a risk that the server will try to | 1359 // contains progress markers, there is a risk that the server will try to |
| 1360 // trigger migration. That would be disastrous, so we must rely on the | 1360 // trigger migration. That would be disastrous, so we must rely on the |
| 1361 // sync manager to ensure that this type never has both progress markers | 1361 // sync manager to ensure that this type never has both progress markers |
| 1362 // and !initial_sync_ended. | 1362 // and !initial_sync_ended. |
| 1363 initialization_state_ = DOWNLOADING_NIGORI; | 1363 initialization_state_ = DOWNLOADING_NIGORI; |
| 1364 ConfigureDataTypes( | 1364 ConfigureDataTypes( |
| 1365 syncer::CONFIGURE_REASON_NEW_CLIENT, | 1365 syncer::CONFIGURE_REASON_NEW_CLIENT, |
| 1366 syncer::ModelTypeSet(syncer::NIGORI), | 1366 syncer::ModelTypeSet(syncer::ControlTypes()), |
| 1367 syncer::ModelTypeSet(), | 1367 syncer::ModelTypeSet(), |
| 1368 // Calls back into this function. | 1368 // Calls back into this function. |
| 1369 base::Bind( | 1369 base::Bind( |
| 1370 &SyncBackendHost:: | 1370 &SyncBackendHost:: |
| 1371 HandleNigoriConfigurationCompletedOnFrontendLoop, | 1371 HandleNigoriConfigurationCompletedOnFrontendLoop, |
| 1372 weak_ptr_factory_.GetWeakPtr()), | 1372 weak_ptr_factory_.GetWeakPtr()), |
| 1373 base::Bind(&SyncBackendHost::OnNigoriDownloadRetry, | 1373 base::Bind(&SyncBackendHost::OnNigoriDownloadRetry, |
| 1374 weak_ptr_factory_.GetWeakPtr())); | 1374 weak_ptr_factory_.GetWeakPtr())); |
| 1375 break; | 1375 break; |
| 1376 case DOWNLOADING_NIGORI: | 1376 case DOWNLOADING_NIGORI: |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 const syncer::ModelTypeSet failed_configuration_types) { | 1562 const syncer::ModelTypeSet failed_configuration_types) { |
| 1563 HandleInitializationCompletedOnFrontendLoop( | 1563 HandleInitializationCompletedOnFrontendLoop( |
| 1564 failed_configuration_types.Empty()); | 1564 failed_configuration_types.Empty()); |
| 1565 } | 1565 } |
| 1566 | 1566 |
| 1567 #undef SDVLOG | 1567 #undef SDVLOG |
| 1568 | 1568 |
| 1569 #undef SLOG | 1569 #undef SLOG |
| 1570 | 1570 |
| 1571 } // namespace browser_sync | 1571 } // namespace browser_sync |
| OLD | NEW |