OLD | NEW |
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 arraysize(localized_strings)); | 105 arraysize(localized_strings)); |
106 | 106 |
107 html_source->AddBoolean( | 107 html_source->AddBoolean( |
108 "isGuest", | 108 "isGuest", |
109 #if defined(OS_CHROMEOS) | 109 #if defined(OS_CHROMEOS) |
110 user_manager::UserManager::Get()->IsLoggedInAsGuest() || | 110 user_manager::UserManager::Get()->IsLoggedInAsGuest() || |
111 user_manager::UserManager::Get()->IsLoggedInAsPublicAccount()); | 111 user_manager::UserManager::Get()->IsLoggedInAsPublicAccount()); |
112 #else | 112 #else |
113 profile->IsOffTheRecord()); | 113 profile->IsOffTheRecord()); |
114 #endif | 114 #endif |
| 115 |
| 116 html_source->AddBoolean("isSupervised", profile->IsSupervised()); |
115 } | 117 } |
116 | 118 |
117 void AddA11yStrings(content::WebUIDataSource* html_source) { | 119 void AddA11yStrings(content::WebUIDataSource* html_source) { |
118 LocalizedString localized_strings[] = { | 120 LocalizedString localized_strings[] = { |
119 {"a11yPageTitle", IDS_SETTINGS_ACCESSIBILITY}, | 121 {"a11yPageTitle", IDS_SETTINGS_ACCESSIBILITY}, |
120 {"a11yWebStore", IDS_SETTINGS_ACCESSIBILITY_WEB_STORE}, | 122 {"a11yWebStore", IDS_SETTINGS_ACCESSIBILITY_WEB_STORE}, |
121 {"moreFeaturesLink", IDS_SETTINGS_MORE_FEATURES_LINK}, | 123 {"moreFeaturesLink", IDS_SETTINGS_MORE_FEATURES_LINK}, |
122 {"moreFeaturesLinkDescription", | 124 {"moreFeaturesLinkDescription", |
123 IDS_SETTINGS_MORE_FEATURES_LINK_DESCRIPTION}, | 125 IDS_SETTINGS_MORE_FEATURES_LINK_DESCRIPTION}, |
124 #if defined(OS_CHROMEOS) | 126 #if defined(OS_CHROMEOS) |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 #if defined(OS_CHROMEOS) | 346 #if defined(OS_CHROMEOS) |
345 {"openWallpaperApp", IDS_SETTINGS_OPEN_WALLPAPER_APP}, | 347 {"openWallpaperApp", IDS_SETTINGS_OPEN_WALLPAPER_APP}, |
346 {"setWallpaper", IDS_SETTINGS_SET_WALLPAPER}, | 348 {"setWallpaper", IDS_SETTINGS_SET_WALLPAPER}, |
347 #endif | 349 #endif |
348 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 350 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
349 {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, | 351 {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, |
350 #endif | 352 #endif |
351 }; | 353 }; |
352 AddLocalizedStringsBulk(html_source, localized_strings, | 354 AddLocalizedStringsBulk(html_source, localized_strings, |
353 arraysize(localized_strings)); | 355 arraysize(localized_strings)); |
354 | |
355 html_source->AddBoolean("isSupervised", profile->IsSupervised()); | |
356 } | 356 } |
357 | 357 |
358 #if defined(OS_CHROMEOS) | 358 #if defined(OS_CHROMEOS) |
359 void AddBluetoothStrings(content::WebUIDataSource* html_source) { | 359 void AddBluetoothStrings(content::WebUIDataSource* html_source) { |
360 LocalizedString localized_strings[] = { | 360 LocalizedString localized_strings[] = { |
361 {"bluetoothAccept", IDS_OPTIONS_SETTINGS_BLUETOOTH_ACCEPT_PASSKEY}, | 361 {"bluetoothAccept", IDS_OPTIONS_SETTINGS_BLUETOOTH_ACCEPT_PASSKEY}, |
362 {"bluetoothConnected", IDS_SETTINGS_BLUETOOTH_CONNECTED}, | 362 {"bluetoothConnected", IDS_SETTINGS_BLUETOOTH_CONNECTED}, |
363 {"bluetoothConnecting", IDS_SETTINGS_BLUETOOTH_CONNECTING}, | 363 {"bluetoothConnecting", IDS_SETTINGS_BLUETOOTH_CONNECTING}, |
364 {"bluetoothDeviceListPaired", IDS_SETTINGS_BLUETOOTH_DEVICE_LIST_PAIRED}, | 364 {"bluetoothDeviceListPaired", IDS_SETTINGS_BLUETOOTH_DEVICE_LIST_PAIRED}, |
365 {"bluetoothDeviceListUnpaired", | 365 {"bluetoothDeviceListUnpaired", |
(...skipping 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2071 | 2071 |
2072 #if defined(OS_CHROMEOS) | 2072 #if defined(OS_CHROMEOS) |
2073 chromeos::network_element::AddLocalizedStrings(html_source); | 2073 chromeos::network_element::AddLocalizedStrings(html_source); |
2074 #endif | 2074 #endif |
2075 policy_indicator::AddLocalizedStrings(html_source); | 2075 policy_indicator::AddLocalizedStrings(html_source); |
2076 | 2076 |
2077 html_source->SetJsonPath(kLocalizedStringsFile); | 2077 html_source->SetJsonPath(kLocalizedStringsFile); |
2078 } | 2078 } |
2079 | 2079 |
2080 } // namespace settings | 2080 } // namespace settings |
OLD | NEW |