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

Unified Diff: chrome/browser/ui/webui/settings/md_settings_ui.cc

Issue 2853113004: chromeos: Add settings to control power management prefs. (Closed)
Patch Set: re-add some code Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/settings/md_settings_ui.cc
diff --git a/chrome/browser/ui/webui/settings/md_settings_ui.cc b/chrome/browser/ui/webui/settings/md_settings_ui.cc
index 1e778aee45a2a5e7db071ba0dc8c6a574996742b..67a2b92cc841ad2080da8c0f9a5fe25bec300ce9 100644
--- a/chrome/browser/ui/webui/settings/md_settings_ui.cc
+++ b/chrome/browser/ui/webui/settings/md_settings_ui.cc
@@ -190,15 +190,11 @@ MdSettingsUI::MdSettingsUI(content::WebUI* web_ui, const GURL& url)
!arc::IsArcOptInVerificationDisabled());
// TODO(mash): Support Chrome power settings in Mash. crbug.com/644348
- bool enable_power_settings =
- !ash_util::IsRunningInMash() &&
- (switches::PowerOverlayEnabled() ||
- (ash::PowerStatus::Get()->IsBatteryPresent() &&
- ash::PowerStatus::Get()->SupportsDualRoleDevices()));
+ bool enable_power_settings = !ash_util::IsRunningInMash();
html_source->AddBoolean("enablePowerSettings", enable_power_settings);
if (enable_power_settings) {
- AddSettingsPageUIHandler(
- base::MakeUnique<chromeos::settings::PowerHandler>());
+ AddSettingsPageUIHandler(base::MakeUnique<chromeos::settings::PowerHandler>(
+ profile->GetPrefs()));
}
#endif

Powered by Google App Engine
This is Rietveld 408576698