| 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" |
| 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/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/ui/webui/policy_indicator_localized_strings_provider.h" | 16 #include "chrome/browser/ui/webui/policy_indicator_localized_strings_provider.h" |
| 17 #include "chrome/common/chrome_features.h" | 17 #include "chrome/common/chrome_features.h" |
| 18 #include "chrome/common/chrome_switches.h" |
| 18 #include "chrome/common/url_constants.h" | 19 #include "chrome/common/url_constants.h" |
| 19 #include "chrome/grit/chromium_strings.h" | 20 #include "chrome/grit/chromium_strings.h" |
| 20 #include "chrome/grit/generated_resources.h" | 21 #include "chrome/grit/generated_resources.h" |
| 21 #include "chrome/grit/locale_settings.h" | 22 #include "chrome/grit/locale_settings.h" |
| 22 #include "components/autofill/core/browser/payments/payments_service_url.h" | 23 #include "components/autofill/core/browser/payments/payments_service_url.h" |
| 23 #include "components/autofill/core/common/autofill_constants.h" | 24 #include "components/autofill/core/common/autofill_constants.h" |
| 24 #include "components/google/core/browser/google_util.h" | 25 #include "components/google/core/browser/google_util.h" |
| 25 #include "components/password_manager/core/browser/password_manager_constants.h" | 26 #include "components/password_manager/core/browser/password_manager_constants.h" |
| 26 #include "components/strings/grit/components_strings.h" | 27 #include "components/strings/grit/components_strings.h" |
| 27 #include "content/public/browser/web_ui_data_source.h" | 28 #include "content/public/browser/web_ui_data_source.h" |
| 28 #include "ui/base/l10n/l10n_util.h" | 29 #include "ui/base/l10n/l10n_util.h" |
| 29 | 30 |
| 31 |
| 30 #if defined(OS_CHROMEOS) | 32 #if defined(OS_CHROMEOS) |
| 31 #include "ash/common/system/chromeos/devicetype_utils.h" | 33 #include "ash/common/system/chromeos/devicetype_utils.h" |
| 32 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 34 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 33 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" | 35 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" |
| 34 #include "chrome/common/chrome_switches.h" | |
| 35 #include "chromeos/chromeos_switches.h" | 36 #include "chromeos/chromeos_switches.h" |
| 36 #include "components/user_manager/user.h" | 37 #include "components/user_manager/user.h" |
| 37 #include "components/user_manager/user_manager.h" | 38 #include "components/user_manager/user_manager.h" |
| 38 #include "ui/chromeos/strings/grit/ui_chromeos_strings.h" | 39 #include "ui/chromeos/strings/grit/ui_chromeos_strings.h" |
| 39 #else | 40 #else |
| 40 #include "chrome/browser/ui/webui/settings/system_handler.h" | 41 #include "chrome/browser/ui/webui/settings/system_handler.h" |
| 41 #endif | 42 #endif |
| 42 | 43 |
| 43 namespace settings { | 44 namespace settings { |
| 44 namespace { | 45 namespace { |
| (...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1480 {"adobeFlashStorage", IDS_SETTINGS_SITE_SETTINGS_ADOBE_FLASH_SETTINGS}, | 1481 {"adobeFlashStorage", IDS_SETTINGS_SITE_SETTINGS_ADOBE_FLASH_SETTINGS}, |
| 1481 {"learnMore", IDS_SETTINGS_SITE_SETTINGS_LEARN_MORE}, | 1482 {"learnMore", IDS_SETTINGS_SITE_SETTINGS_LEARN_MORE}, |
| 1482 {"incognitoSite", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO}, | 1483 {"incognitoSite", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO}, |
| 1483 {"incognitoSiteOnly", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO_ONLY}, | 1484 {"incognitoSiteOnly", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO_ONLY}, |
| 1484 {"embeddedIncognitoSite", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO_EMBEDDED}, | 1485 {"embeddedIncognitoSite", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO_EMBEDDED}, |
| 1485 {"siteSettingsSiteDetails", IDS_SETTINGS_SITE_DETAILS}, | 1486 {"siteSettingsSiteDetails", IDS_SETTINGS_SITE_DETAILS}, |
| 1486 }; | 1487 }; |
| 1487 AddLocalizedStringsBulk(html_source, localized_strings, | 1488 AddLocalizedStringsBulk(html_source, localized_strings, |
| 1488 arraysize(localized_strings)); | 1489 arraysize(localized_strings)); |
| 1489 | 1490 |
| 1491 html_source->AddBoolean("enableSiteSettingsAllSitesAndDetails", |
| 1492 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1493 switches::kSiteSettingsAllSitesAndDetails)); |
| 1494 |
| 1490 if (base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins)) { | 1495 if (base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins)) { |
| 1491 LocalizedString flash_strings[] = { | 1496 LocalizedString flash_strings[] = { |
| 1492 {"siteSettingsFlashAskBefore", | 1497 {"siteSettingsFlashAskBefore", |
| 1493 IDS_SETTINGS_SITE_SETTINGS_FLASH_ASK_BEFORE_RUNNING}, | 1498 IDS_SETTINGS_SITE_SETTINGS_FLASH_ASK_BEFORE_RUNNING}, |
| 1494 {"siteSettingsFlashAskBeforeSubtitle", | 1499 {"siteSettingsFlashAskBeforeSubtitle", |
| 1495 IDS_SETTINGS_SITE_SETTINGS_FLASH_ASK_BEFORE_RUNNING_SUBTITLE}, | 1500 IDS_SETTINGS_SITE_SETTINGS_FLASH_ASK_BEFORE_RUNNING_SUBTITLE}, |
| 1496 }; | 1501 }; |
| 1497 AddLocalizedStringsBulk(html_source, flash_strings, | 1502 AddLocalizedStringsBulk(html_source, flash_strings, |
| 1498 arraysize(flash_strings)); | 1503 arraysize(flash_strings)); |
| 1499 } else { | 1504 } else { |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1710 #endif | 1715 #endif |
| 1711 AddUsersStrings(html_source); | 1716 AddUsersStrings(html_source); |
| 1712 AddWebContentStrings(html_source); | 1717 AddWebContentStrings(html_source); |
| 1713 | 1718 |
| 1714 policy_indicator::AddLocalizedStrings(html_source); | 1719 policy_indicator::AddLocalizedStrings(html_source); |
| 1715 | 1720 |
| 1716 html_source->SetJsonPath(kLocalizedStringsFile); | 1721 html_source->SetJsonPath(kLocalizedStringsFile); |
| 1717 } | 1722 } |
| 1718 | 1723 |
| 1719 } // namespace settings | 1724 } // namespace settings |
| OLD | NEW |