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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 { "yes", IDS_SYNC_PASSPHRASE_CANCEL_YES }, | 309 { "yes", IDS_SYNC_PASSPHRASE_CANCEL_YES }, |
310 { "no", IDS_SYNC_PASSPHRASE_CANCEL_NO }, | 310 { "no", IDS_SYNC_PASSPHRASE_CANCEL_NO }, |
311 { "sectionExplicitMessagePrefix", IDS_SYNC_PASSPHRASE_MSG_EXPLICIT_PREFIX }, | 311 { "sectionExplicitMessagePrefix", IDS_SYNC_PASSPHRASE_MSG_EXPLICIT_PREFIX }, |
312 { "sectionExplicitMessagePostfix", | 312 { "sectionExplicitMessagePostfix", |
313 IDS_SYNC_PASSPHRASE_MSG_EXPLICIT_POSTFIX }, | 313 IDS_SYNC_PASSPHRASE_MSG_EXPLICIT_POSTFIX }, |
314 { "encryptedDataTypesTitle", IDS_SYNC_ENCRYPTION_DATA_TYPES_TITLE }, | 314 { "encryptedDataTypesTitle", IDS_SYNC_ENCRYPTION_DATA_TYPES_TITLE }, |
315 { "encryptSensitiveOption", IDS_SYNC_ENCRYPT_SENSITIVE_DATA }, | 315 { "encryptSensitiveOption", IDS_SYNC_ENCRYPT_SENSITIVE_DATA }, |
316 { "encryptAllOption", IDS_SYNC_ENCRYPT_ALL_DATA }, | 316 { "encryptAllOption", IDS_SYNC_ENCRYPT_ALL_DATA }, |
317 { "encryptAllOption", IDS_SYNC_ENCRYPT_ALL_DATA }, | 317 { "encryptAllOption", IDS_SYNC_ENCRYPT_ALL_DATA }, |
318 { "aspWarningText", IDS_SYNC_ASP_PASSWORD_WARNING_TEXT }, | 318 { "aspWarningText", IDS_SYNC_ASP_PASSWORD_WARNING_TEXT }, |
319 { "promoPageTitle", IDS_NEW_TAB_TITLE}, | 319 { "promoPageTitle", IDS_SYNC_PROMO_TAB_TITLE}, |
320 { "promoMessageBody", IDS_SYNC_PROMO_MESSAGE_BODY}, | 320 { "promoMessageBody", IDS_SYNC_PROMO_MESSAGE_BODY}, |
321 { "promoSkipButton", IDS_SYNC_PROMO_SKIP_BUTTON}, | 321 { "promoSkipButton", IDS_SYNC_PROMO_SKIP_BUTTON}, |
322 { "promoAdvanced", IDS_SYNC_PROMO_ADVANCED}, | 322 { "promoAdvanced", IDS_SYNC_PROMO_ADVANCED}, |
323 { "promoLearnMoreShow", IDS_SYNC_PROMO_LEARN_MORE_SHOW}, | 323 { "promoLearnMoreShow", IDS_SYNC_PROMO_LEARN_MORE_SHOW}, |
324 { "promoLearnMoreHide", IDS_SYNC_PROMO_LEARN_MORE_HIDE}, | 324 { "promoLearnMoreHide", IDS_SYNC_PROMO_LEARN_MORE_HIDE}, |
325 { "promoInformation", IDS_SYNC_PROMO_INFORMATION}, | 325 { "promoInformation", IDS_SYNC_PROMO_INFORMATION}, |
326 }; | 326 }; |
327 | 327 |
328 RegisterStrings(localized_strings, resources, arraysize(resources)); | 328 RegisterStrings(localized_strings, resources, arraysize(resources)); |
329 } | 329 } |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 } | 630 } |
631 | 631 |
632 void SyncSetupHandler::ShowLoginErrorMessage(const string16& error_message) { | 632 void SyncSetupHandler::ShowLoginErrorMessage(const string16& error_message) { |
633 DictionaryValue args; | 633 DictionaryValue args; |
634 Profile* profile = Profile::FromWebUI(web_ui_); | 634 Profile* profile = Profile::FromWebUI(web_ui_); |
635 ProfileSyncService* service = profile->GetProfileSyncService(); | 635 ProfileSyncService* service = profile->GetProfileSyncService(); |
636 SyncSetupFlow::GetArgsForGaiaLogin(service, &args); | 636 SyncSetupFlow::GetArgsForGaiaLogin(service, &args); |
637 args.SetString("error_message", error_message); | 637 args.SetString("error_message", error_message); |
638 ShowGaiaLogin(args); | 638 ShowGaiaLogin(args); |
639 } | 639 } |
OLD | NEW |