Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc

Issue 2068653003: Settings People Revamp: Add Payments integration to new Sync Settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/settings/md_settings_localized_strings_provide r.h" 5 #include "chrome/browser/ui/webui/settings/md_settings_localized_strings_provide r.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/ui/webui/policy_indicator_localized_strings_provider.h" 14 #include "chrome/browser/ui/webui/policy_indicator_localized_strings_provider.h"
15 #include "chrome/common/url_constants.h" 15 #include "chrome/common/url_constants.h"
16 #include "chrome/grit/chromium_strings.h" 16 #include "chrome/grit/chromium_strings.h"
17 #include "chrome/grit/generated_resources.h" 17 #include "chrome/grit/generated_resources.h"
18 #include "chrome/grit/google_chrome_strings.h" 18 #include "chrome/grit/google_chrome_strings.h"
19 #include "chrome/grit/locale_settings.h" 19 #include "chrome/grit/locale_settings.h"
20 #include "chrome/grit/settings_chromium_strings.h" 20 #include "chrome/grit/settings_chromium_strings.h"
21 #include "chrome/grit/settings_google_chrome_strings.h" 21 #include "chrome/grit/settings_google_chrome_strings.h"
22 #include "chrome/grit/settings_strings.h" 22 #include "chrome/grit/settings_strings.h"
23 #include "components/autofill/core/common/autofill_constants.h"
23 #include "components/google/core/browser/google_util.h" 24 #include "components/google/core/browser/google_util.h"
24 #include "components/password_manager/core/browser/password_manager_constants.h" 25 #include "components/password_manager/core/browser/password_manager_constants.h"
25 #include "content/public/browser/web_ui_data_source.h" 26 #include "content/public/browser/web_ui_data_source.h"
26 #include "grit/components_strings.h" 27 #include "grit/components_strings.h"
27 #include "ui/base/l10n/l10n_util.h" 28 #include "ui/base/l10n/l10n_util.h"
28 29
29 #if defined(OS_CHROMEOS) 30 #if defined(OS_CHROMEOS)
30 #include "ash/system/chromeos/devicetype_utils.h" 31 #include "ash/system/chromeos/devicetype_utils.h"
31 #include "chrome/browser/chromeos/profiles/profile_helper.h" 32 #include "chrome/browser/chromeos/profiles/profile_helper.h"
32 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" 33 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h"
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 {"appCheckboxLabel", IDS_SETTINGS_APPS_CHECKBOX_LABEL}, 754 {"appCheckboxLabel", IDS_SETTINGS_APPS_CHECKBOX_LABEL},
754 {"extensionsCheckboxLabel", IDS_SETTINGS_EXTENSIONS_CHECKBOX_LABEL}, 755 {"extensionsCheckboxLabel", IDS_SETTINGS_EXTENSIONS_CHECKBOX_LABEL},
755 {"settingsCheckboxLabel", IDS_SETTINGS_SETTINGS_CHECKBOX_LABEL}, 756 {"settingsCheckboxLabel", IDS_SETTINGS_SETTINGS_CHECKBOX_LABEL},
756 {"autofillCheckboxLabel", IDS_SETTINGS_AUTOFILL_CHECKBOX_LABEL}, 757 {"autofillCheckboxLabel", IDS_SETTINGS_AUTOFILL_CHECKBOX_LABEL},
757 {"historyCheckboxLabel", IDS_SETTINGS_HISTORY_CHECKBOX_LABEL}, 758 {"historyCheckboxLabel", IDS_SETTINGS_HISTORY_CHECKBOX_LABEL},
758 {"themesAndWallpapersCheckboxLabel", 759 {"themesAndWallpapersCheckboxLabel",
759 IDS_SETTINGS_THEMES_AND_WALLPAPERS_CHECKBOX_LABEL}, 760 IDS_SETTINGS_THEMES_AND_WALLPAPERS_CHECKBOX_LABEL},
760 {"bookmarksCheckboxLabel", IDS_SETTINGS_BOOKMARKS_CHECKBOX_LABEL}, 761 {"bookmarksCheckboxLabel", IDS_SETTINGS_BOOKMARKS_CHECKBOX_LABEL},
761 {"passwordsCheckboxLabel", IDS_SETTINGS_PASSWORDS_CHECKBOX_LABEL}, 762 {"passwordsCheckboxLabel", IDS_SETTINGS_PASSWORDS_CHECKBOX_LABEL},
762 {"openTabsCheckboxLabel", IDS_SETTINGS_OPEN_TABS_CHECKBOX_LABEL}, 763 {"openTabsCheckboxLabel", IDS_SETTINGS_OPEN_TABS_CHECKBOX_LABEL},
764 {"enablePaymentsIntegrationCheckboxLabel",
765 IDS_SETTINGS_ENABLE_PAYMENTS_INTEGRATION_CHECKBOX_LABEL},
763 {"encryptionOptionsTitle", IDS_SETTINGS_ENCRYPTION_OPTIONS}, 766 {"encryptionOptionsTitle", IDS_SETTINGS_ENCRYPTION_OPTIONS},
764 {"syncDataEncryptedText", IDS_SETTINGS_SYNC_DATA_ENCRYPTED_TEXT}, 767 {"syncDataEncryptedText", IDS_SETTINGS_SYNC_DATA_ENCRYPTED_TEXT},
765 {"encryptWithGoogleCredentialsLabel", 768 {"encryptWithGoogleCredentialsLabel",
766 IDS_SETTINGS_ENCRYPT_WITH_GOOGLE_CREDENTIALS_LABEL}, 769 IDS_SETTINGS_ENCRYPT_WITH_GOOGLE_CREDENTIALS_LABEL},
767 {"encryptWithSyncPassphraseLabel", 770 {"encryptWithSyncPassphraseLabel",
768 IDS_SETTINGS_ENCRYPT_WITH_SYNC_PASSPHRASE_LABEL}, 771 IDS_SETTINGS_ENCRYPT_WITH_SYNC_PASSPHRASE_LABEL},
769 {"encryptWithSyncPassphraseLearnMoreLink", 772 {"encryptWithSyncPassphraseLearnMoreLink",
770 IDS_SETTINGS_ENCRYPT_WITH_SYNC_PASSPHRASE_LEARN_MORE_LINK}, 773 IDS_SETTINGS_ENCRYPT_WITH_SYNC_PASSPHRASE_LEARN_MORE_LINK},
771 {"useDefaultSettingsButton", IDS_SETTINGS_USE_DEFAULT_SETTINGS}, 774 {"useDefaultSettingsButton", IDS_SETTINGS_USE_DEFAULT_SETTINGS},
772 {"passphraseExplanationText", IDS_SETTINGS_PASSPHRASE_EXPLANATION_TEXT}, 775 {"passphraseExplanationText", IDS_SETTINGS_PASSPHRASE_EXPLANATION_TEXT},
773 {"emptyPassphraseError", IDS_SETTINGS_EMPTY_PASSPHRASE_ERROR}, 776 {"emptyPassphraseError", IDS_SETTINGS_EMPTY_PASSPHRASE_ERROR},
774 {"mismatchedPassphraseError", IDS_SETTINGS_MISMATCHED_PASSPHRASE_ERROR}, 777 {"mismatchedPassphraseError", IDS_SETTINGS_MISMATCHED_PASSPHRASE_ERROR},
775 {"incorrectPassphraseError", IDS_SETTINGS_INCORRECT_PASSPHRASE_ERROR}, 778 {"incorrectPassphraseError", IDS_SETTINGS_INCORRECT_PASSPHRASE_ERROR},
776 {"passphrasePlaceholder", IDS_SETTINGS_PASSPHRASE_PLACEHOLDER}, 779 {"passphrasePlaceholder", IDS_SETTINGS_PASSPHRASE_PLACEHOLDER},
777 {"passphraseConfirmationPlaceholder", 780 {"passphraseConfirmationPlaceholder",
778 IDS_SETTINGS_PASSPHRASE_CONFIRMATION_PLACEHOLDER}, 781 IDS_SETTINGS_PASSPHRASE_CONFIRMATION_PLACEHOLDER},
779 {"submitPassphraseButton", IDS_SETTINGS_SUBMIT_PASSPHRASE}, 782 {"submitPassphraseButton", IDS_SETTINGS_SUBMIT_PASSPHRASE},
780 {"personalizeGoogleServicesTitle", 783 {"personalizeGoogleServicesTitle",
781 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TITLE}, 784 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TITLE},
782 {"personalizeGoogleServicesText", 785 {"personalizeGoogleServicesText",
783 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TEXT}, 786 IDS_SETTINGS_PERSONALIZE_GOOGLE_SERVICES_TEXT},
784 }; 787 };
785 AddLocalizedStringsBulk(html_source, localized_strings, 788 AddLocalizedStringsBulk(html_source, localized_strings,
786 arraysize(localized_strings)); 789 arraysize(localized_strings));
787 790
791 html_source->AddString("autofillHelpURL", autofill::kHelpURL);
788 html_source->AddString("supervisedUsersUrl", 792 html_source->AddString("supervisedUsersUrl",
789 chrome::kLegacySupervisedUserManagementURL); 793 chrome::kLegacySupervisedUserManagementURL);
790 std::string disconnect_help_url = 794 std::string disconnect_help_url =
791 google_util::AppendGoogleLocaleParam( 795 google_util::AppendGoogleLocaleParam(
792 GURL(chrome::kSyncGoogleDashboardURL), 796 GURL(chrome::kSyncGoogleDashboardURL),
793 g_browser_process->GetApplicationLocale()) 797 g_browser_process->GetApplicationLocale())
794 .spec(); 798 .spec();
795 html_source->AddString( 799 html_source->AddString(
796 "syncDisconnectExplanation", 800 "syncDisconnectExplanation",
797 l10n_util::GetStringFUTF16(IDS_SETTINGS_SYNC_DISCONNECT_EXPLANATION, 801 l10n_util::GetStringFUTF16(IDS_SETTINGS_SYNC_DISCONNECT_EXPLANATION,
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 #endif 1138 #endif
1135 AddUsersStrings(html_source); 1139 AddUsersStrings(html_source);
1136 AddWebContentStrings(html_source); 1140 AddWebContentStrings(html_source);
1137 1141
1138 policy_indicator::AddLocalizedStrings(html_source); 1142 policy_indicator::AddLocalizedStrings(html_source);
1139 1143
1140 html_source->SetJsonPath(kLocalizedStringsFile); 1144 html_source->SetJsonPath(kLocalizedStringsFile);
1141 } 1145 }
1142 1146
1143 } // namespace settings 1147 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698