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

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

Issue 2964293002: CrOS Settings: Add skeleton page for multidevice section. (Closed)
Patch Set: Sync and rebase Created 3 years, 5 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/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
(...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after
2027 {"advancedFontSettings", IDS_SETTINGS_ADVANCED_FONT_SETTINGS}, 2027 {"advancedFontSettings", IDS_SETTINGS_ADVANCED_FONT_SETTINGS},
2028 {"openAdvancedFontSettings", IDS_SETTINGS_OPEN_ADVANCED_FONT_SETTINGS}, 2028 {"openAdvancedFontSettings", IDS_SETTINGS_OPEN_ADVANCED_FONT_SETTINGS},
2029 {"requiresWebStoreExtension", IDS_SETTINGS_REQUIRES_WEB_STORE_EXTENSION}, 2029 {"requiresWebStoreExtension", IDS_SETTINGS_REQUIRES_WEB_STORE_EXTENSION},
2030 {"quickBrownFox", IDS_SETTINGS_QUICK_BROWN_FOX}, 2030 {"quickBrownFox", IDS_SETTINGS_QUICK_BROWN_FOX},
2031 }; 2031 };
2032 AddLocalizedStringsBulk(html_source, localized_strings, 2032 AddLocalizedStringsBulk(html_source, localized_strings,
2033 arraysize(localized_strings)); 2033 arraysize(localized_strings));
2034 } 2034 }
2035 2035
2036 #if defined(OS_CHROMEOS) 2036 #if defined(OS_CHROMEOS)
2037 void AddMultideviceStrings(content::WebUIDataSource* html_source) {
2038 LocalizedString localized_strings[] = {
2039 {"multidevicePageTitle", IDS_SETTINGS_MULTIDEVICE},
2040 {"smsConnect", IDS_SETTINGS_MULTIDEVICE_SMS_CONNECT},
2041 {"smsConnectSummary", IDS_SETTINGS_MULTIDEVICE_SMS_CONNECT_SUMMARY},
2042 };
2043 AddLocalizedStringsBulk(html_source, localized_strings,
2044 arraysize(localized_strings));
2045
2046 html_source->AddBoolean("enableMultideviceSettings",
2047 base::FeatureList::IsEnabled(features::kMultidevice));
2048 }
2049 #endif
2050
2051 #if defined(OS_CHROMEOS)
2037 void AddOncStrings(content::WebUIDataSource* html_source) { 2052 void AddOncStrings(content::WebUIDataSource* html_source) {
2038 LocalizedString onc_property_strings[] = { 2053 LocalizedString onc_property_strings[] = {
2039 // Thes strings are generated by prepending 'Onc' to the ONC property 2054 // Thes strings are generated by prepending 'Onc' to the ONC property
2040 // name. Any '.' in the property name is replaced with '-'. Properties 2055 // name. Any '.' in the property name is replaced with '-'. Properties
2041 // with translatable enumerated values have the value appended after '_'. 2056 // with translatable enumerated values have the value appended after '_'.
2042 {"OncCellular-APN-AccessPointName", 2057 {"OncCellular-APN-AccessPointName",
2043 IDS_ONC_CELLULAR_APN_ACCESS_POINT_NAME}, 2058 IDS_ONC_CELLULAR_APN_ACCESS_POINT_NAME},
2044 {"OncCellular-APN-AccessPointName_none", 2059 {"OncCellular-APN-AccessPointName_none",
2045 IDS_ONC_CELLULAR_APN_ACCESS_POINT_NAME_NONE}, 2060 IDS_ONC_CELLULAR_APN_ACCESS_POINT_NAME_NONE},
2046 {"OncCellular-APN-Password", IDS_ONC_CELLULAR_APN_PASSWORD}, 2061 {"OncCellular-APN-Password", IDS_ONC_CELLULAR_APN_PASSWORD},
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
2166 2181
2167 #if defined(OS_CHROMEOS) 2182 #if defined(OS_CHROMEOS)
2168 AddAccountUITweaksStrings(html_source, profile); 2183 AddAccountUITweaksStrings(html_source, profile);
2169 AddAndroidAppStrings(html_source); 2184 AddAndroidAppStrings(html_source);
2170 AddBluetoothStrings(html_source); 2185 AddBluetoothStrings(html_source);
2171 AddChromeOSUserStrings(html_source, profile); 2186 AddChromeOSUserStrings(html_source, profile);
2172 AddDateTimeStrings(html_source); 2187 AddDateTimeStrings(html_source);
2173 AddDeviceStrings(html_source); 2188 AddDeviceStrings(html_source);
2174 AddEasyUnlockStrings(html_source); 2189 AddEasyUnlockStrings(html_source);
2175 AddInternetStrings(html_source); 2190 AddInternetStrings(html_source);
2191 AddMultideviceStrings(html_source);
2176 AddOncStrings(html_source); 2192 AddOncStrings(html_source);
2177 AddUsersStrings(html_source); 2193 AddUsersStrings(html_source);
2178 #else 2194 #else
2179 AddDefaultBrowserStrings(html_source); 2195 AddDefaultBrowserStrings(html_source);
2180 AddImportDataStrings(html_source); 2196 AddImportDataStrings(html_source);
2181 AddSystemStrings(html_source); 2197 AddSystemStrings(html_source);
2182 #endif 2198 #endif
2183 2199
2184 #if defined(USE_NSS_CERTS) 2200 #if defined(USE_NSS_CERTS)
2185 AddCertificateManagerStrings(html_source); 2201 AddCertificateManagerStrings(html_source);
2186 #endif 2202 #endif
2187 2203
2188 #if defined(OS_CHROMEOS) 2204 #if defined(OS_CHROMEOS)
2189 chromeos::network_element::AddLocalizedStrings(html_source); 2205 chromeos::network_element::AddLocalizedStrings(html_source);
2190 #endif 2206 #endif
2191 policy_indicator::AddLocalizedStrings(html_source); 2207 policy_indicator::AddLocalizedStrings(html_source);
2192 2208
2193 html_source->SetJsonPath(kLocalizedStringsFile); 2209 html_source->SetJsonPath(kLocalizedStringsFile);
2194 } 2210 }
2195 2211
2196 } // namespace settings 2212 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698