| 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/ui/webui/sync_setup_handler.h" | 5 #include "chrome/browser/ui/webui/sync_setup_handler.h" |
| 6 | 6 |
| 7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 { "chooseDataTypes", IDS_SYNC_CHOOSE_DATATYPES }, | 232 { "chooseDataTypes", IDS_SYNC_CHOOSE_DATATYPES }, |
| 233 { "bookmarks", IDS_SYNC_DATATYPE_BOOKMARKS }, | 233 { "bookmarks", IDS_SYNC_DATATYPE_BOOKMARKS }, |
| 234 { "preferences", IDS_SYNC_DATATYPE_PREFERENCES }, | 234 { "preferences", IDS_SYNC_DATATYPE_PREFERENCES }, |
| 235 { "autofill", IDS_SYNC_DATATYPE_AUTOFILL }, | 235 { "autofill", IDS_SYNC_DATATYPE_AUTOFILL }, |
| 236 { "themes", IDS_SYNC_DATATYPE_THEMES }, | 236 { "themes", IDS_SYNC_DATATYPE_THEMES }, |
| 237 { "passwords", IDS_SYNC_DATATYPE_PASSWORDS }, | 237 { "passwords", IDS_SYNC_DATATYPE_PASSWORDS }, |
| 238 { "extensions", IDS_SYNC_DATATYPE_EXTENSIONS }, | 238 { "extensions", IDS_SYNC_DATATYPE_EXTENSIONS }, |
| 239 { "typedURLs", IDS_SYNC_DATATYPE_TYPED_URLS }, | 239 { "typedURLs", IDS_SYNC_DATATYPE_TYPED_URLS }, |
| 240 { "apps", IDS_SYNC_DATATYPE_APPS }, | 240 { "apps", IDS_SYNC_DATATYPE_APPS }, |
| 241 { "searchEngines", IDS_SYNC_DATATYPE_SEARCH_ENGINES }, | 241 { "searchEngines", IDS_SYNC_DATATYPE_SEARCH_ENGINES }, |
| 242 { "foreignSessions", IDS_SYNC_DATATYPE_SESSIONS }, | 242 { "openTabs", IDS_SYNC_DATATYPE_TABS }, |
| 243 { "syncZeroDataTypesError", IDS_SYNC_ZERO_DATA_TYPES_ERROR }, | 243 { "syncZeroDataTypesError", IDS_SYNC_ZERO_DATA_TYPES_ERROR }, |
| 244 { "abortedError", IDS_SYNC_SETUP_ABORTED_BY_PENDING_CLEAR }, | 244 { "abortedError", IDS_SYNC_SETUP_ABORTED_BY_PENDING_CLEAR }, |
| 245 { "encryptAllLabel", IDS_SYNC_ENCRYPT_ALL_LABEL }, | 245 { "encryptAllLabel", IDS_SYNC_ENCRYPT_ALL_LABEL }, |
| 246 { "googleOption", IDS_SYNC_PASSPHRASE_OPT_GOOGLE }, | 246 { "googleOption", IDS_SYNC_PASSPHRASE_OPT_GOOGLE }, |
| 247 { "explicitOption", IDS_SYNC_PASSPHRASE_OPT_EXPLICIT }, | 247 { "explicitOption", IDS_SYNC_PASSPHRASE_OPT_EXPLICIT }, |
| 248 { "sectionGoogleMessage", IDS_SYNC_PASSPHRASE_MSG_GOOGLE }, | 248 { "sectionGoogleMessage", IDS_SYNC_PASSPHRASE_MSG_GOOGLE }, |
| 249 { "sectionExplicitMessage", IDS_SYNC_PASSPHRASE_MSG_EXPLICIT }, | 249 { "sectionExplicitMessage", IDS_SYNC_PASSPHRASE_MSG_EXPLICIT }, |
| 250 { "passphraseLabel", IDS_SYNC_PASSPHRASE_LABEL }, | 250 { "passphraseLabel", IDS_SYNC_PASSPHRASE_LABEL }, |
| 251 { "confirmLabel", IDS_SYNC_CONFIRM_PASSPHRASE_LABEL }, | 251 { "confirmLabel", IDS_SYNC_CONFIRM_PASSPHRASE_LABEL }, |
| 252 { "emptyErrorMessage", IDS_SYNC_EMPTY_PASSPHRASE_ERROR }, | 252 { "emptyErrorMessage", IDS_SYNC_EMPTY_PASSPHRASE_ERROR }, |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 ShowSetupUI(); | 485 ShowSetupUI(); |
| 486 | 486 |
| 487 // The SyncSetupFlow will set itself as the |flow_|. | 487 // The SyncSetupFlow will set itself as the |flow_|. |
| 488 if (!service->get_wizard().AttachSyncSetupHandler(this)) { | 488 if (!service->get_wizard().AttachSyncSetupHandler(this)) { |
| 489 // If attach fails, a wizard is already activated and attached to a flow | 489 // If attach fails, a wizard is already activated and attached to a flow |
| 490 // handler. | 490 // handler. |
| 491 web_ui_->CallJavascriptFunction("OptionsPage.closeOverlay"); | 491 web_ui_->CallJavascriptFunction("OptionsPage.closeOverlay"); |
| 492 service->get_wizard().Focus(); | 492 service->get_wizard().Focus(); |
| 493 } | 493 } |
| 494 } | 494 } |
| OLD | NEW |