| 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_ui.h" | 5 #include "chrome/browser/ui/webui/settings/md_settings_ui.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 "pinUnlockEnabled", | 165 "pinUnlockEnabled", |
| 166 chromeos::quick_unlock::IsPinEnabled(profile->GetPrefs())); | 166 chromeos::quick_unlock::IsPinEnabled(profile->GetPrefs())); |
| 167 html_source->AddBoolean("fingerprintUnlockEnabled", | 167 html_source->AddBoolean("fingerprintUnlockEnabled", |
| 168 chromeos::quick_unlock::IsFingerprintEnabled()); | 168 chromeos::quick_unlock::IsFingerprintEnabled()); |
| 169 html_source->AddBoolean("androidAppsAllowed", | 169 html_source->AddBoolean("androidAppsAllowed", |
| 170 arc::IsArcAllowedForProfile(profile) && | 170 arc::IsArcAllowedForProfile(profile) && |
| 171 !arc::IsArcOptInVerificationDisabled()); | 171 !arc::IsArcOptInVerificationDisabled()); |
| 172 | 172 |
| 173 // TODO(mash): Support Chrome power settings in Mash. crbug.com/644348 | 173 // TODO(mash): Support Chrome power settings in Mash. crbug.com/644348 |
| 174 bool enable_power_settings = | 174 bool enable_power_settings = |
| 175 !ash_util::IsRunningInMash() && | 175 !IsRunningInMash() && |
| 176 (switches::PowerOverlayEnabled() || | 176 (switches::PowerOverlayEnabled() || |
| 177 (ash::PowerStatus::Get()->IsBatteryPresent() && | 177 (ash::PowerStatus::Get()->IsBatteryPresent() && |
| 178 ash::PowerStatus::Get()->SupportsDualRoleDevices())); | 178 ash::PowerStatus::Get()->SupportsDualRoleDevices())); |
| 179 html_source->AddBoolean("enablePowerSettings", enable_power_settings); | 179 html_source->AddBoolean("enablePowerSettings", enable_power_settings); |
| 180 if (enable_power_settings) { | 180 if (enable_power_settings) { |
| 181 AddSettingsPageUIHandler( | 181 AddSettingsPageUIHandler( |
| 182 base::MakeUnique<chromeos::settings::PowerHandler>()); | 182 base::MakeUnique<chromeos::settings::PowerHandler>()); |
| 183 } | 183 } |
| 184 #endif | 184 #endif |
| 185 | 185 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD", | 233 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD", |
| 234 base::Time::Now() - load_start_time_); | 234 base::Time::Now() - load_start_time_); |
| 235 } | 235 } |
| 236 | 236 |
| 237 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() { | 237 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() { |
| 238 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD", | 238 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD", |
| 239 base::Time::Now() - load_start_time_); | 239 base::Time::Now() - load_start_time_); |
| 240 } | 240 } |
| 241 | 241 |
| 242 } // namespace settings | 242 } // namespace settings |
| OLD | NEW |