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

Unified Diff: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc

Issue 2964823002: Remove confusing keyboard test & focus on input device (Closed)
Patch Set: Remove unnecessary check & include. Rename vector Created 3 years, 5 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
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/oobe_display_chooser_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
index d2db7e5a08c7062d2dcdb78b0667fe2388ae3025..94f71158bb7b01ca53fcbdb18a7681b015be52ff 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
@@ -226,17 +226,12 @@ std::string GetDisplayType(const GURL& url) {
return path;
}
-bool IsKeyboardConnected() {
- const std::vector<ui::InputDevice>& keyboards =
- ui::InputDeviceManager::GetInstance()->GetKeyboardDevices();
- for (const ui::InputDevice& keyboard : keyboards) {
- if (keyboard.type == ui::INPUT_DEVICE_INTERNAL ||
- keyboard.type == ui::INPUT_DEVICE_EXTERNAL) {
- return true;
- }
- }
-
- return false;
+bool IsRemoraRequisitioned() {
+ policy::DeviceCloudPolicyManagerChromeOS* policy_manager =
+ g_browser_process->platform_part()
+ ->browser_policy_connector_chromeos()
+ ->GetDeviceCloudPolicyManager();
+ return policy_manager && policy_manager->IsRemoraRequisition();
}
} // namespace
@@ -376,7 +371,7 @@ OobeUI::OobeUI(content::WebUI* web_ui, const GURL& url)
// TODO(felixe): Display iteration and primary display selection not supported
// in Mash. See http://crbug.com/720917.
- if (!ash_util::IsRunningInMash() && !IsKeyboardConnected())
+ if (!ash_util::IsRunningInMash() && IsRemoraRequisitioned())
oobe_display_chooser_ = base::MakeUnique<OobeDisplayChooser>();
}
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/oobe_display_chooser_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698