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 17 matching lines...) Expand all Loading... |
28 #include "components/google/core/browser/google_util.h" | 28 #include "components/google/core/browser/google_util.h" |
29 #include "components/password_manager/core/browser/password_manager_constants.h" | 29 #include "components/password_manager/core/browser/password_manager_constants.h" |
30 #include "components/safe_browsing/common/safe_browsing_prefs.h" | 30 #include "components/safe_browsing/common/safe_browsing_prefs.h" |
31 #include "components/strings/grit/components_strings.h" | 31 #include "components/strings/grit/components_strings.h" |
32 #include "components/subresource_filter/core/browser/subresource_filter_features
.h" | 32 #include "components/subresource_filter/core/browser/subresource_filter_features
.h" |
33 #include "content/public/browser/web_ui_data_source.h" | 33 #include "content/public/browser/web_ui_data_source.h" |
34 #include "ui/base/l10n/l10n_util.h" | 34 #include "ui/base/l10n/l10n_util.h" |
35 | 35 |
36 #if defined(OS_CHROMEOS) | 36 #if defined(OS_CHROMEOS) |
37 #include "ash/system/devicetype_utils.h" | 37 #include "ash/system/devicetype_utils.h" |
| 38 #include "ash/system/night_light/night_light_controller.h" |
38 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" | 39 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" |
39 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" | 40 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" |
40 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 41 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
41 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 42 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
42 #include "chrome/browser/ui/webui/chromeos/network_element_localized_strings_pro
vider.h" | 43 #include "chrome/browser/ui/webui/chromeos/network_element_localized_strings_pro
vider.h" |
43 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" | 44 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" |
44 #include "chromeos/chromeos_switches.h" | 45 #include "chromeos/chromeos_switches.h" |
45 #include "components/user_manager/user.h" | 46 #include "components/user_manager/user.h" |
46 #include "components/user_manager/user_manager.h" | 47 #include "components/user_manager/user_manager.h" |
47 #include "ui/display/display_switches.h" | 48 #include "ui/display/display_switches.h" |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 arraysize(display_strings)); | 693 arraysize(display_strings)); |
693 html_source->AddBoolean("unifiedDesktopAvailable", | 694 html_source->AddBoolean("unifiedDesktopAvailable", |
694 base::CommandLine::ForCurrentProcess()->HasSwitch( | 695 base::CommandLine::ForCurrentProcess()->HasSwitch( |
695 ::switches::kEnableUnifiedDesktop)); | 696 ::switches::kEnableUnifiedDesktop)); |
696 | 697 |
697 html_source->AddBoolean( | 698 html_source->AddBoolean( |
698 "enableTouchCalibrationSetting", | 699 "enableTouchCalibrationSetting", |
699 base::CommandLine::ForCurrentProcess()->HasSwitch( | 700 base::CommandLine::ForCurrentProcess()->HasSwitch( |
700 chromeos::switches::kEnableTouchCalibrationSetting)); | 701 chromeos::switches::kEnableTouchCalibrationSetting)); |
701 | 702 |
| 703 html_source->AddBoolean("nightLightFeatureEnabled", |
| 704 ash::NightLightController::IsFeatureEnabled()); |
| 705 |
702 LocalizedString storage_strings[] = { | 706 LocalizedString storage_strings[] = { |
703 {"storageTitle", IDS_SETTINGS_STORAGE_TITLE}, | 707 {"storageTitle", IDS_SETTINGS_STORAGE_TITLE}, |
704 {"storageItemInUse", IDS_SETTINGS_STORAGE_ITEM_IN_USE}, | 708 {"storageItemInUse", IDS_SETTINGS_STORAGE_ITEM_IN_USE}, |
705 {"storageItemAvailable", IDS_SETTINGS_STORAGE_ITEM_AVAILABLE}, | 709 {"storageItemAvailable", IDS_SETTINGS_STORAGE_ITEM_AVAILABLE}, |
706 {"storageItemDownloads", IDS_SETTINGS_STORAGE_ITEM_DOWNLOADS}, | 710 {"storageItemDownloads", IDS_SETTINGS_STORAGE_ITEM_DOWNLOADS}, |
707 {"storageItemDriveCache", IDS_SETTINGS_STORAGE_ITEM_DRIVE_CACHE}, | 711 {"storageItemDriveCache", IDS_SETTINGS_STORAGE_ITEM_DRIVE_CACHE}, |
708 {"storageItemBrowsingData", IDS_SETTINGS_STORAGE_ITEM_BROWSING_DATA}, | 712 {"storageItemBrowsingData", IDS_SETTINGS_STORAGE_ITEM_BROWSING_DATA}, |
709 {"storageItemAndroid", IDS_SETTINGS_STORAGE_ITEM_ANDROID}, | 713 {"storageItemAndroid", IDS_SETTINGS_STORAGE_ITEM_ANDROID}, |
710 {"storageItemOtherUsers", IDS_SETTINGS_STORAGE_ITEM_OTHER_USERS}, | 714 {"storageItemOtherUsers", IDS_SETTINGS_STORAGE_ITEM_OTHER_USERS}, |
711 {"storageSizeComputing", IDS_SETTINGS_STORAGE_SIZE_CALCULATING}, | 715 {"storageSizeComputing", IDS_SETTINGS_STORAGE_SIZE_CALCULATING}, |
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2148 | 2152 |
2149 #if defined(OS_CHROMEOS) | 2153 #if defined(OS_CHROMEOS) |
2150 chromeos::network_element::AddLocalizedStrings(html_source); | 2154 chromeos::network_element::AddLocalizedStrings(html_source); |
2151 #endif | 2155 #endif |
2152 policy_indicator::AddLocalizedStrings(html_source); | 2156 policy_indicator::AddLocalizedStrings(html_source); |
2153 | 2157 |
2154 html_source->SetJsonPath(kLocalizedStringsFile); | 2158 html_source->SetJsonPath(kLocalizedStringsFile); |
2155 } | 2159 } |
2156 | 2160 |
2157 } // namespace settings | 2161 } // namespace settings |
OLD | NEW |