| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 if (auto_start_enabled_ && !SetupInProgress()) { | 599 if (auto_start_enabled_ && !SetupInProgress()) { |
| 600 // Backend is initialized but we're not in sync setup, so this must be an | 600 // Backend is initialized but we're not in sync setup, so this must be an |
| 601 // autostart - mark our sync setup as completed. | 601 // autostart - mark our sync setup as completed. |
| 602 if (sync_prefs_.IsStartSuppressed()) { | 602 if (sync_prefs_.IsStartSuppressed()) { |
| 603 // TODO(sync): This call to ShowConfigure() should go away in favor | 603 // TODO(sync): This call to ShowConfigure() should go away in favor |
| 604 // of the code below that calls wizard_.Step() - http://crbug.com/95269. | 604 // of the code below that calls wizard_.Step() - http://crbug.com/95269. |
| 605 ShowConfigure(true); | 605 ShowConfigure(true); |
| 606 return; | 606 return; |
| 607 } else { | 607 } else { |
| 608 SetSyncSetupCompleted(); | 608 SetSyncSetupCompleted(); |
| 609 NotifyObservers(); |
| 609 } | 610 } |
| 610 } | 611 } |
| 611 | 612 |
| 612 if (HasSyncSetupCompleted()) { | 613 if (HasSyncSetupCompleted()) { |
| 613 ConfigureDataTypeManager(); | 614 ConfigureDataTypeManager(); |
| 614 } else if (SetupInProgress()) { | 615 } else if (SetupInProgress()) { |
| 615 wizard_.Step(SyncSetupWizard::SYNC_EVERYTHING); | 616 wizard_.Step(SyncSetupWizard::SYNC_EVERYTHING); |
| 616 } else { | 617 } else { |
| 617 // This should only be hit during integration tests, but there's no good | 618 // This should only be hit during integration tests, but there's no good |
| 618 // way to assert this. | 619 // way to assert this. |
| (...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1593 << "Unrecoverable error."; | 1594 << "Unrecoverable error."; |
| 1594 } else { | 1595 } else { |
| 1595 DVLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " | 1596 DVLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " |
| 1596 << "initialized"; | 1597 << "initialized"; |
| 1597 } | 1598 } |
| 1598 } | 1599 } |
| 1599 | 1600 |
| 1600 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { | 1601 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { |
| 1601 return failed_datatypes_handler_; | 1602 return failed_datatypes_handler_; |
| 1602 } | 1603 } |
| OLD | NEW |