OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_flow.h" | 5 #include "chrome/browser/sync/sync_setup_flow.h" |
6 | 6 |
7 #include "app/gfx/font_util.h" | 7 #include "app/gfx/font_util.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 return false; | 121 return false; |
122 if (sync_extensions) | 122 if (sync_extensions) |
123 config->data_types.insert(syncable::EXTENSIONS); | 123 config->data_types.insert(syncable::EXTENSIONS); |
124 | 124 |
125 bool sync_typed_urls; | 125 bool sync_typed_urls; |
126 if (!result->GetBoolean("syncTypedUrls", &sync_typed_urls)) | 126 if (!result->GetBoolean("syncTypedUrls", &sync_typed_urls)) |
127 return false; | 127 return false; |
128 if (sync_typed_urls) | 128 if (sync_typed_urls) |
129 config->data_types.insert(syncable::TYPED_URLS); | 129 config->data_types.insert(syncable::TYPED_URLS); |
130 | 130 |
| 131 bool sync_sessions; |
| 132 if (!result->GetBoolean("syncSessions", &sync_sessions)) |
| 133 return false; |
| 134 if (sync_sessions) |
| 135 config->data_types.insert(syncable::SESSIONS); |
| 136 |
131 bool sync_apps; | 137 bool sync_apps; |
132 if (!result->GetBoolean("syncApps", &sync_apps)) | 138 if (!result->GetBoolean("syncApps", &sync_apps)) |
133 return false; | 139 return false; |
134 if (sync_apps) | 140 if (sync_apps) |
135 config->data_types.insert(syncable::APPS); | 141 config->data_types.insert(syncable::APPS); |
136 | 142 |
137 // Encyption settings. | 143 // Encyption settings. |
138 if (!result->GetBoolean("usePassphrase", &config->use_secondary_passphrase)) | 144 if (!result->GetBoolean("usePassphrase", &config->use_secondary_passphrase)) |
139 return false; | 145 return false; |
140 | 146 |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 | 675 |
670 void SyncSetupFlow::OnPassphraseEntry(const std::string& passphrase) { | 676 void SyncSetupFlow::OnPassphraseEntry(const std::string& passphrase) { |
671 if (current_state_ == SyncSetupWizard::ENTER_PASSPHRASE) { | 677 if (current_state_ == SyncSetupWizard::ENTER_PASSPHRASE) { |
672 service_->SetSecondaryPassphrase(passphrase); | 678 service_->SetSecondaryPassphrase(passphrase); |
673 Advance(SyncSetupWizard::SETTING_UP); | 679 Advance(SyncSetupWizard::SETTING_UP); |
674 } else if (configuration_pending_) { | 680 } else if (configuration_pending_) { |
675 configuration_.secondary_passphrase = passphrase; | 681 configuration_.secondary_passphrase = passphrase; |
676 OnConfigurationComplete(); | 682 OnConfigurationComplete(); |
677 } | 683 } |
678 } | 684 } |
OLD | NEW |