| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_SYNC_SYNC_SETUP_WIZARD_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SYNC_SETUP_WIZARD_H_ |
| 6 #define CHROME_BROWSER_SYNC_SYNC_SETUP_WIZARD_H_ | 6 #define CHROME_BROWSER_SYNC_SYNC_SETUP_WIZARD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "gfx/native_widget_types.h" | 10 #include "gfx/native_widget_types.h" |
| 11 | 11 |
| 12 class SyncSetupFlowContainer; | 12 class SyncSetupFlowContainer; |
| 13 | 13 |
| 14 class ProfileSyncService; | 14 class ProfileSyncService; |
| 15 | 15 |
| 16 class SyncSetupWizard { | 16 class SyncSetupWizard { |
| 17 public: | 17 public: |
| 18 enum State { | 18 enum State { |
| 19 // Show the Google Account login UI. | 19 // Show the Google Account login UI. |
| 20 GAIA_LOGIN = 0, | 20 GAIA_LOGIN = 0, |
| 21 // A login attempt succeeded. This will wait for an explicit transition | 21 // A login attempt succeeded. This will wait for an explicit transition |
| 22 // (via Step) to the next state. | 22 // (via Step) to the next state. |
| 23 GAIA_SUCCESS, | 23 GAIA_SUCCESS, |
| 24 // Show the screen that lets you click either "Keep everything synced" or | 24 // Show the screen that lets you configure sync. |
| 25 // "Choose which data types to sync", and checkboxes for each data type. | 25 // There are two tabs: |
| 26 CHOOSE_DATA_TYPES, | 26 // Data Types -- |
| 27 // Show the screen that lets you create a passphrase (if you've never set | 27 // Choose either "Keep everything synced" or |
| 28 // one up before). | 28 // "Choose which data types to sync", and checkboxes for each data type. |
| 29 // Encryption -- |
| 30 // Choose what to encrypt and whether to use a passphrase. |
| 31 CONFIGURE, |
| 32 // Show the screen that lets you enter a new passphrase |
| 29 CREATE_PASSPHRASE, | 33 CREATE_PASSPHRASE, |
| 30 // Show the screen that lets you enter the passphrase (if you've set one up | 34 // Show the screen that prompts for your passphrase |
| 31 // on another machine). | |
| 32 ENTER_PASSPHRASE, | 35 ENTER_PASSPHRASE, |
| 33 // Show the screen that lets you reset your passphrase (if you forgot it). | |
| 34 RESET_PASSPHRASE, | |
| 35 // The panic switch. Something went terribly wrong during setup and we | 36 // The panic switch. Something went terribly wrong during setup and we |
| 36 // can't recover. | 37 // can't recover. |
| 37 FATAL_ERROR, | 38 FATAL_ERROR, |
| 38 // The client can't set up sync at the moment due to a concurrent operation | 39 // The client can't set up sync at the moment due to a concurrent operation |
| 39 // to clear cloud data being in progress on the server. | 40 // to clear cloud data being in progress on the server. |
| 40 SETUP_ABORTED_BY_PENDING_CLEAR, | 41 SETUP_ABORTED_BY_PENDING_CLEAR, |
| 42 // Loading screen with spinny throbber. |
| 43 SETTING_UP, |
| 41 // A final state for when setup completes and it is possible it is the | 44 // A final state for when setup completes and it is possible it is the |
| 42 // user's first time (globally speaking) as the cloud doesn't have any | 45 // user's first time (globally speaking) as the cloud doesn't have any |
| 43 // bookmarks. We show additional info in this case to explain setting up | 46 // bookmarks. We show additional info in this case to explain setting up |
| 44 // more computers. | 47 // more computers. |
| 45 DONE_FIRST_TIME, | 48 DONE_FIRST_TIME, |
| 46 // A catch-all done case for any setup process. | 49 // A catch-all done case for any setup process. |
| 47 DONE | 50 DONE |
| 48 }; | 51 }; |
| 49 | 52 |
| 50 explicit SyncSetupWizard(ProfileSyncService* service); | 53 explicit SyncSetupWizard(ProfileSyncService* service); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 80 ProfileSyncService* service_; | 83 ProfileSyncService* service_; |
| 81 | 84 |
| 82 SyncSetupFlowContainer* flow_container_; | 85 SyncSetupFlowContainer* flow_container_; |
| 83 | 86 |
| 84 gfx::NativeWindow parent_window_; | 87 gfx::NativeWindow parent_window_; |
| 85 | 88 |
| 86 DISALLOW_COPY_AND_ASSIGN(SyncSetupWizard); | 89 DISALLOW_COPY_AND_ASSIGN(SyncSetupWizard); |
| 87 }; | 90 }; |
| 88 | 91 |
| 89 #endif // CHROME_BROWSER_SYNC_SYNC_SETUP_WIZARD_H_ | 92 #endif // CHROME_BROWSER_SYNC_SYNC_SETUP_WIZARD_H_ |
| OLD | NEW |