| 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/sync_setup_wizard.h" | 5 #include "chrome/browser/sync/sync_setup_wizard.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <ostream> | 8 #include <ostream> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 return flow; | 70 return flow; |
| 71 } | 71 } |
| 72 | 72 |
| 73 // static | 73 // static |
| 74 SyncSetupWizard::State SyncSetupWizard::GetEndStateForDiscreteRun( | 74 SyncSetupWizard::State SyncSetupWizard::GetEndStateForDiscreteRun( |
| 75 State start_state) { | 75 State start_state) { |
| 76 State result = FATAL_ERROR; | 76 State result = FATAL_ERROR; |
| 77 if (start_state == GAIA_LOGIN) { | 77 if (start_state == GAIA_LOGIN) { |
| 78 result = GAIA_SUCCESS; | 78 result = GAIA_SUCCESS; |
| 79 } else if (start_state == ENTER_PASSPHRASE || | 79 } else if (start_state == ENTER_PASSPHRASE || |
| 80 start_state == NONFATAL_ERROR || |
| 80 start_state == SYNC_EVERYTHING || | 81 start_state == SYNC_EVERYTHING || |
| 81 start_state == CONFIGURE) { | 82 start_state == CONFIGURE) { |
| 82 result = DONE; | 83 result = DONE; |
| 83 } | 84 } |
| 84 DCHECK_NE(FATAL_ERROR, result) << | 85 DCHECK_NE(FATAL_ERROR, result) << |
| 85 "Invalid start state for discrete run: " << start_state; | 86 "Invalid start state for discrete run: " << start_state; |
| 86 return result; | 87 return result; |
| 87 } | 88 } |
| OLD | NEW |