| OLD | NEW |
| 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_SYNC_SYNC_SETUP_FLOW_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SYNC_SETUP_FLOW_H_ |
| 6 #define CHROME_BROWSER_SYNC_SYNC_SETUP_FLOW_H_ | 6 #define CHROME_BROWSER_SYNC_SYNC_SETUP_FLOW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 13 #include "base/time.h" | 13 #include "base/time.h" |
| 14 #include "chrome/browser/dom_ui/html_dialog_ui.h" | 14 #include "chrome/browser/dom_ui/html_dialog_ui.h" |
| 15 #include "chrome/browser/sync/profile_sync_service.h" | 15 #include "chrome/browser/sync/profile_sync_service.h" |
| 16 #include "chrome/browser/sync/sync_setup_wizard.h" | 16 #include "chrome/browser/sync/sync_setup_wizard.h" |
| 17 #include "chrome/browser/sync/syncable/model_type.h" | 17 #include "chrome/browser/sync/syncable/model_type.h" |
| 18 #include "gfx/native_widget_types.h" | 18 #include "gfx/native_widget_types.h" |
| 19 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
| 20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
| 21 | 21 |
| 22 class FlowHandler; | 22 class FlowHandler; |
| 23 class SyncSetupFlowContainer; | 23 class SyncSetupFlowContainer; |
| 24 | 24 |
| 25 // A structure which contains all the configuration information for sync. | 25 // A structure which contains all the configuration information for sync. |
| 26 // This can be stored or passed around when the configuration is managed | 26 // This can be stored or passed around when the configuration is managed |
| 27 // by multiple stages of the wizard. | 27 // by multiple stages of the wizard. |
| 28 struct SyncConfiguration { | 28 struct SyncConfiguration { |
| 29 SyncConfiguration(); |
| 30 ~SyncConfiguration(); |
| 31 |
| 29 bool sync_everything; | 32 bool sync_everything; |
| 30 syncable::ModelTypeSet data_types; | 33 syncable::ModelTypeSet data_types; |
| 31 bool use_secondary_passphrase; | 34 bool use_secondary_passphrase; |
| 32 std::string secondary_passphrase; | 35 std::string secondary_passphrase; |
| 33 }; | 36 }; |
| 34 | 37 |
| 35 // The state machine used by SyncSetupWizard, exposed in its own header | 38 // The state machine used by SyncSetupWizard, exposed in its own header |
| 36 // to facilitate testing of SyncSetupWizard. This class is used to open and | 39 // to facilitate testing of SyncSetupWizard. This class is used to open and |
| 37 // run the html dialog and deletes itself when the dialog closes. | 40 // run the html dialog and deletes itself when the dialog closes. |
| 38 class SyncSetupFlow : public HtmlDialogUIDelegate { | 41 class SyncSetupFlow : public HtmlDialogUIDelegate { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 } | 226 } |
| 224 | 227 |
| 225 private: | 228 private: |
| 226 void ExecuteJavascriptInIFrame(const std::wstring& iframe_xpath, | 229 void ExecuteJavascriptInIFrame(const std::wstring& iframe_xpath, |
| 227 const std::wstring& js); | 230 const std::wstring& js); |
| 228 SyncSetupFlow* flow_; | 231 SyncSetupFlow* flow_; |
| 229 DISALLOW_COPY_AND_ASSIGN(FlowHandler); | 232 DISALLOW_COPY_AND_ASSIGN(FlowHandler); |
| 230 }; | 233 }; |
| 231 | 234 |
| 232 #endif // CHROME_BROWSER_SYNC_SYNC_SETUP_FLOW_H_ | 235 #endif // CHROME_BROWSER_SYNC_SYNC_SETUP_FLOW_H_ |
| OLD | NEW |