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

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

Issue 2498153002: [MD Settings][MD User Manager] create/manage profile desktop shortcut (Windows only) (Closed)
Patch Set: Addressed comments Created 4 years, 1 month 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/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 15 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
16 #include "chrome/browser/plugins/plugin_utils.h" 16 #include "chrome/browser/plugins/plugin_utils.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/profiles/profile_shortcut_manager.h"
18 #include "chrome/browser/ui/webui/policy_indicator_localized_strings_provider.h" 19 #include "chrome/browser/ui/webui/policy_indicator_localized_strings_provider.h"
19 #include "chrome/common/chrome_features.h" 20 #include "chrome/common/chrome_features.h"
20 #include "chrome/common/chrome_switches.h" 21 #include "chrome/common/chrome_switches.h"
21 #include "chrome/common/url_constants.h" 22 #include "chrome/common/url_constants.h"
22 #include "chrome/grit/chromium_strings.h" 23 #include "chrome/grit/chromium_strings.h"
23 #include "chrome/grit/generated_resources.h" 24 #include "chrome/grit/generated_resources.h"
24 #include "chrome/grit/locale_settings.h" 25 #include "chrome/grit/locale_settings.h"
25 #include "components/autofill/core/browser/payments/payments_service_url.h" 26 #include "components/autofill/core/browser/payments/payments_service_url.h"
26 #include "components/autofill/core/common/autofill_constants.h" 27 #include "components/autofill/core/common/autofill_constants.h"
27 #include "components/google/core/browser/google_util.h" 28 #include "components/google/core/browser/google_util.h"
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 {"authorCredit", IDS_SETTINGS_CHANGE_PICTURE_AUTHOR_TEXT}, 1066 {"authorCredit", IDS_SETTINGS_CHANGE_PICTURE_AUTHOR_TEXT},
1066 {"photoFromCamera", IDS_SETTINGS_CHANGE_PICTURE_PHOTO_FROM_CAMERA}, 1067 {"photoFromCamera", IDS_SETTINGS_CHANGE_PICTURE_PHOTO_FROM_CAMERA},
1067 {"photoFlippedAccessibleText", IDS_SETTINGS_PHOTO_FLIP_ACCESSIBLE_TEXT}, 1068 {"photoFlippedAccessibleText", IDS_SETTINGS_PHOTO_FLIP_ACCESSIBLE_TEXT},
1068 {"photoFlippedBackAccessibleText", 1069 {"photoFlippedBackAccessibleText",
1069 IDS_SETTINGS_PHOTO_FLIPBACK_ACCESSIBLE_TEXT}, 1070 IDS_SETTINGS_PHOTO_FLIPBACK_ACCESSIBLE_TEXT},
1070 {"photoCaptureAccessibleText", IDS_SETTINGS_PHOTO_CAPTURE_ACCESSIBLE_TEXT}, 1071 {"photoCaptureAccessibleText", IDS_SETTINGS_PHOTO_CAPTURE_ACCESSIBLE_TEXT},
1071 {"photoDiscardAccessibleText", IDS_SETTINGS_PHOTO_DISCARD_ACCESSIBLE_TEXT}, 1072 {"photoDiscardAccessibleText", IDS_SETTINGS_PHOTO_DISCARD_ACCESSIBLE_TEXT},
1072 #else // !defined(OS_CHROMEOS) 1073 #else // !defined(OS_CHROMEOS)
1073 {"domainManagedProfile", IDS_SETTINGS_PEOPLE_DOMAIN_MANAGED_PROFILE}, 1074 {"domainManagedProfile", IDS_SETTINGS_PEOPLE_DOMAIN_MANAGED_PROFILE},
1074 {"editPerson", IDS_SETTINGS_EDIT_PERSON}, 1075 {"editPerson", IDS_SETTINGS_EDIT_PERSON},
1076 {"showShortcutLabel", IDS_SETTINGS_PROFILE_SHORTCUT_TOGGLE_LABEL},
1075 #endif // defined(OS_CHROMEOS) 1077 #endif // defined(OS_CHROMEOS)
1076 {"syncOverview", IDS_SETTINGS_SYNC_OVERVIEW}, 1078 {"syncOverview", IDS_SETTINGS_SYNC_OVERVIEW},
1077 {"syncSignin", IDS_SETTINGS_SYNC_SIGNIN}, 1079 {"syncSignin", IDS_SETTINGS_SYNC_SIGNIN},
1078 {"syncDisconnect", IDS_SETTINGS_SYNC_DISCONNECT}, 1080 {"syncDisconnect", IDS_SETTINGS_SYNC_DISCONNECT},
1079 {"syncDisconnectTitle", IDS_SETTINGS_SYNC_DISCONNECT_TITLE}, 1081 {"syncDisconnectTitle", IDS_SETTINGS_SYNC_DISCONNECT_TITLE},
1080 {"syncDisconnectDeleteProfile", 1082 {"syncDisconnectDeleteProfile",
1081 IDS_SETTINGS_SYNC_DISCONNECT_DELETE_PROFILE}, 1083 IDS_SETTINGS_SYNC_DISCONNECT_DELETE_PROFILE},
1082 {"syncDisconnectConfirm", IDS_SETTINGS_SYNC_DISCONNECT_CONFIRM}, 1084 {"syncDisconnectConfirm", IDS_SETTINGS_SYNC_DISCONNECT_CONFIRM},
1083 {"sync", IDS_SETTINGS_SYNC}, 1085 {"sync", IDS_SETTINGS_SYNC},
1084 {"syncPageTitle", IDS_SETTINGS_SYNC_PAGE_TITLE}, 1086 {"syncPageTitle", IDS_SETTINGS_SYNC_PAGE_TITLE},
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 l10n_util::GetStringFUTF8( 1169 l10n_util::GetStringFUTF8(
1168 IDS_SETTINGS_SYNC_DISCONNECT_MANAGED_PROFILE_EXPLANATION, 1170 IDS_SETTINGS_SYNC_DISCONNECT_MANAGED_PROFILE_EXPLANATION,
1169 base::ASCIIToUTF16("$1"), 1171 base::ASCIIToUTF16("$1"),
1170 base::ASCIIToUTF16(sync_dashboard_url))); 1172 base::ASCIIToUTF16(sync_dashboard_url)));
1171 #endif 1173 #endif
1172 1174
1173 html_source->AddString("syncErrorHelpUrl", chrome::kSyncErrorsHelpURL); 1175 html_source->AddString("syncErrorHelpUrl", chrome::kSyncErrorsHelpURL);
1174 1176
1175 html_source->AddString("activityControlsUrl", 1177 html_source->AddString("activityControlsUrl",
1176 chrome::kGoogleAccountActivityControlsURL); 1178 chrome::kGoogleAccountActivityControlsURL);
1179
1180 html_source->AddBoolean("profileShortcutsEnabled",
1181 ProfileShortcutManager::IsFeatureEnabled());
1177 } 1182 }
1178 1183
1179 void AddPrintingStrings(content::WebUIDataSource* html_source) { 1184 void AddPrintingStrings(content::WebUIDataSource* html_source) {
1180 LocalizedString localized_strings[] = { 1185 LocalizedString localized_strings[] = {
1181 {"printingPageTitle", IDS_SETTINGS_PRINTING}, 1186 {"printingPageTitle", IDS_SETTINGS_PRINTING},
1182 {"printingCloudPrintLearnMoreLabel", 1187 {"printingCloudPrintLearnMoreLabel",
1183 IDS_SETTINGS_PRINTING_CLOUD_PRINT_LEARN_MORE_LABEL}, 1188 IDS_SETTINGS_PRINTING_CLOUD_PRINT_LEARN_MORE_LABEL},
1184 {"printingNotificationsLabel", IDS_SETTINGS_PRINTING_NOTIFICATIONS_LABEL}, 1189 {"printingNotificationsLabel", IDS_SETTINGS_PRINTING_NOTIFICATIONS_LABEL},
1185 {"printingManageCloudPrintDevices", 1190 {"printingManageCloudPrintDevices",
1186 IDS_SETTINGS_PRINTING_MANAGE_CLOUD_PRINT_DEVICES}, 1191 IDS_SETTINGS_PRINTING_MANAGE_CLOUD_PRINT_DEVICES},
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 #if defined(USE_NSS_CERTS) 1788 #if defined(USE_NSS_CERTS)
1784 AddCertificateManagerStrings(html_source); 1789 AddCertificateManagerStrings(html_source);
1785 #endif 1790 #endif
1786 1791
1787 policy_indicator::AddLocalizedStrings(html_source); 1792 policy_indicator::AddLocalizedStrings(html_source);
1788 1793
1789 html_source->SetJsonPath(kLocalizedStringsFile); 1794 html_source->SetJsonPath(kLocalizedStringsFile);
1790 } 1795 }
1791 1796
1792 } // namespace settings 1797 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698