chrome_views_delegate_chromeos.cc revision eb525c5499e34cc9c4b825d6d9e75bb07cc06ace
1// Copyright 2013 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#include "chrome/browser/ui/views/chrome_views_delegate.h" 6 7#include "base/time/time.h" 8#include "chrome/browser/chromeos/login/user_manager.h" 9#include "chrome/browser/chromeos/system/statistics_provider.h" 10#include "chromeos/chromeos_constants.h" 11 12base::TimeDelta 13ChromeViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() { 14 // Enable password echo on login screen when the keyboard driven flag is set. 15 if (chromeos::UserManager::IsInitialized() && 16 !chromeos::UserManager::Get()->IsUserLoggedIn()) { 17 bool keyboard_driven_oobe = false; 18 chromeos::system::StatisticsProvider::GetInstance()->GetMachineFlag( 19 chromeos::system::kOemKeyboardDrivenOobeKey, &keyboard_driven_oobe); 20 if (keyboard_driven_oobe) 21 return base::TimeDelta::FromSeconds(1); 22 } 23 24 return base::TimeDelta(); 25} 26