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_flow.h" | 5 #include "chrome/browser/sync/sync_setup_flow.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 args->SetBoolean("passwordsRegistered", | 133 args->SetBoolean("passwordsRegistered", |
134 registered_types.count(syncable::PASSWORDS) > 0); | 134 registered_types.count(syncable::PASSWORDS) > 0); |
135 args->SetBoolean("autofillRegistered", | 135 args->SetBoolean("autofillRegistered", |
136 registered_types.count(syncable::AUTOFILL) > 0); | 136 registered_types.count(syncable::AUTOFILL) > 0); |
137 args->SetBoolean("extensionsRegistered", | 137 args->SetBoolean("extensionsRegistered", |
138 registered_types.count(syncable::EXTENSIONS) > 0); | 138 registered_types.count(syncable::EXTENSIONS) > 0); |
139 args->SetBoolean("typedUrlsRegistered", | 139 args->SetBoolean("typedUrlsRegistered", |
140 registered_types.count(syncable::TYPED_URLS) > 0); | 140 registered_types.count(syncable::TYPED_URLS) > 0); |
141 args->SetBoolean("appsRegistered", | 141 args->SetBoolean("appsRegistered", |
142 registered_types.count(syncable::APPS) > 0); | 142 registered_types.count(syncable::APPS) > 0); |
143 args->SetBoolean("searchEnginesRegistered", | |
144 registered_types.count(syncable::SEARCH_ENGINES) > 0); | |
145 args->SetBoolean("sessionsRegistered", | 143 args->SetBoolean("sessionsRegistered", |
146 registered_types.count(syncable::SESSIONS) > 0); | 144 registered_types.count(syncable::SESSIONS) > 0); |
147 args->SetBoolean("syncBookmarks", | 145 args->SetBoolean("syncBookmarks", |
148 preferred_types.count(syncable::BOOKMARKS) > 0); | 146 preferred_types.count(syncable::BOOKMARKS) > 0); |
149 args->SetBoolean("syncPreferences", | 147 args->SetBoolean("syncPreferences", |
150 preferred_types.count(syncable::PREFERENCES) > 0); | 148 preferred_types.count(syncable::PREFERENCES) > 0); |
151 args->SetBoolean("syncThemes", | 149 args->SetBoolean("syncThemes", |
152 preferred_types.count(syncable::THEMES) > 0); | 150 preferred_types.count(syncable::THEMES) > 0); |
153 args->SetBoolean("syncPasswords", | 151 args->SetBoolean("syncPasswords", |
154 preferred_types.count(syncable::PASSWORDS) > 0); | 152 preferred_types.count(syncable::PASSWORDS) > 0); |
155 args->SetBoolean("syncAutofill", | 153 args->SetBoolean("syncAutofill", |
156 preferred_types.count(syncable::AUTOFILL) > 0); | 154 preferred_types.count(syncable::AUTOFILL) > 0); |
157 args->SetBoolean("syncExtensions", | 155 args->SetBoolean("syncExtensions", |
158 preferred_types.count(syncable::EXTENSIONS) > 0); | 156 preferred_types.count(syncable::EXTENSIONS) > 0); |
159 args->SetBoolean("syncSearchEngines", | |
160 preferred_types.count(syncable::SEARCH_ENGINES) > 0); | |
161 args->SetBoolean("syncSessions", | 157 args->SetBoolean("syncSessions", |
162 preferred_types.count(syncable::SESSIONS) > 0); | 158 preferred_types.count(syncable::SESSIONS) > 0); |
163 args->SetBoolean("syncTypedUrls", | 159 args->SetBoolean("syncTypedUrls", |
164 preferred_types.count(syncable::TYPED_URLS) > 0); | 160 preferred_types.count(syncable::TYPED_URLS) > 0); |
165 args->SetBoolean("syncApps", | 161 args->SetBoolean("syncApps", |
166 preferred_types.count(syncable::APPS) > 0); | 162 preferred_types.count(syncable::APPS) > 0); |
167 | 163 |
168 args->SetBoolean("encryptionEnabled", | 164 args->SetBoolean("encryptionEnabled", |
169 !CommandLine::ForCurrentProcess()->HasSwitch( | 165 !CommandLine::ForCurrentProcess()->HasSwitch( |
170 switches::kDisableSyncEncryption)); | 166 switches::kDisableSyncEncryption)); |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 } | 496 } |
501 case SyncSetupWizard::DONE: | 497 case SyncSetupWizard::DONE: |
502 case SyncSetupWizard::ABORT: | 498 case SyncSetupWizard::ABORT: |
503 flow_handler_->ShowSetupDone( | 499 flow_handler_->ShowSetupDone( |
504 UTF16ToWide(service_->GetAuthenticatedUsername())); | 500 UTF16ToWide(service_->GetAuthenticatedUsername())); |
505 break; | 501 break; |
506 default: | 502 default: |
507 NOTREACHED() << "Invalid advance state: " << state; | 503 NOTREACHED() << "Invalid advance state: " << state; |
508 } | 504 } |
509 } | 505 } |
OLD | NEW |