| 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 12 matching lines...) Expand all Loading... |
| 23 #include "components/google/core/browser/google_util.h" | 23 #include "components/google/core/browser/google_util.h" |
| 24 #include "components/password_manager/core/browser/password_manager_constants.h" | 24 #include "components/password_manager/core/browser/password_manager_constants.h" |
| 25 #include "content/public/browser/web_ui_data_source.h" | 25 #include "content/public/browser/web_ui_data_source.h" |
| 26 #include "grit/components_strings.h" | 26 #include "grit/components_strings.h" |
| 27 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
| 28 | 28 |
| 29 #if defined(OS_CHROMEOS) | 29 #if defined(OS_CHROMEOS) |
| 30 #include "ash/common/system/chromeos/devicetype_utils.h" | 30 #include "ash/common/system/chromeos/devicetype_utils.h" |
| 31 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 31 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 32 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" | 32 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" |
| 33 #include "chrome/common/chrome_switches.h" |
| 33 #include "chromeos/chromeos_switches.h" | 34 #include "chromeos/chromeos_switches.h" |
| 34 #include "components/user_manager/user.h" | 35 #include "components/user_manager/user.h" |
| 35 #include "components/user_manager/user_manager.h" | 36 #include "components/user_manager/user_manager.h" |
| 36 #include "ui/chromeos/strings/grit/ui_chromeos_strings.h" | 37 #include "ui/chromeos/strings/grit/ui_chromeos_strings.h" |
| 37 #else | 38 #else |
| 38 #include "chrome/browser/ui/webui/settings/system_handler.h" | 39 #include "chrome/browser/ui/webui/settings/system_handler.h" |
| 39 #endif | 40 #endif |
| 40 | 41 |
| 41 namespace settings { | 42 namespace settings { |
| 42 namespace { | 43 namespace { |
| (...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 {"printerAddress", IDS_SETTINGS_PRINTING_CUPS_PRINTER_ADVANCED_ADDRESS}, | 1006 {"printerAddress", IDS_SETTINGS_PRINTING_CUPS_PRINTER_ADVANCED_ADDRESS}, |
| 1006 {"printerProtocol", IDS_SETTINGS_PRINTING_CUPS_PRINTER_ADVANCED_PROTOCOL}, | 1007 {"printerProtocol", IDS_SETTINGS_PRINTING_CUPS_PRINTER_ADVANCED_PROTOCOL}, |
| 1007 #endif | 1008 #endif |
| 1008 }; | 1009 }; |
| 1009 AddLocalizedStringsBulk(html_source, localized_strings, | 1010 AddLocalizedStringsBulk(html_source, localized_strings, |
| 1010 arraysize(localized_strings)); | 1011 arraysize(localized_strings)); |
| 1011 | 1012 |
| 1012 html_source->AddString("devicesUrl", chrome::kChromeUIDevicesURL); | 1013 html_source->AddString("devicesUrl", chrome::kChromeUIDevicesURL); |
| 1013 html_source->AddString("printingCloudPrintLearnMoreUrl", | 1014 html_source->AddString("printingCloudPrintLearnMoreUrl", |
| 1014 chrome::kCloudPrintLearnMoreURL); | 1015 chrome::kCloudPrintLearnMoreURL); |
| 1016 |
| 1017 #if defined(OS_CHROMEOS) |
| 1018 html_source->AddBoolean("showCupsPrintingFeatures", |
| 1019 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1020 ::switches::kEnableNativeCups)); |
| 1021 #endif |
| 1015 } | 1022 } |
| 1016 | 1023 |
| 1017 void AddPrivacyStrings(content::WebUIDataSource* html_source) { | 1024 void AddPrivacyStrings(content::WebUIDataSource* html_source) { |
| 1018 LocalizedString localized_strings[] = { | 1025 LocalizedString localized_strings[] = { |
| 1019 {"privacyPageTitle", IDS_SETTINGS_PRIVACY}, | 1026 {"privacyPageTitle", IDS_SETTINGS_PRIVACY}, |
| 1020 {"linkDoctorPref", IDS_SETTINGS_LINKDOCTOR_PREF}, | 1027 {"linkDoctorPref", IDS_SETTINGS_LINKDOCTOR_PREF}, |
| 1021 {"searchSuggestPref", IDS_SETTINGS_SUGGEST_PREF}, | 1028 {"searchSuggestPref", IDS_SETTINGS_SUGGEST_PREF}, |
| 1022 {"networkPredictionEnabled", | 1029 {"networkPredictionEnabled", |
| 1023 IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_DESCRIPTION}, | 1030 IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_DESCRIPTION}, |
| 1024 {"safeBrowsingEnableProtection", | 1031 {"safeBrowsingEnableProtection", |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1434 #endif | 1441 #endif |
| 1435 AddUsersStrings(html_source); | 1442 AddUsersStrings(html_source); |
| 1436 AddWebContentStrings(html_source); | 1443 AddWebContentStrings(html_source); |
| 1437 | 1444 |
| 1438 policy_indicator::AddLocalizedStrings(html_source); | 1445 policy_indicator::AddLocalizedStrings(html_source); |
| 1439 | 1446 |
| 1440 html_source->SetJsonPath(kLocalizedStringsFile); | 1447 html_source->SetJsonPath(kLocalizedStringsFile); |
| 1441 } | 1448 } |
| 1442 | 1449 |
| 1443 } // namespace settings | 1450 } // namespace settings |
| OLD | NEW |