chrome_views_delegate_chromeos.cc revision 868fa2fe829687343ffae624259930155e16dbd8
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.h" 8#include "chrome/browser/chromeos/login/startup_utils.h" 9#include "chrome/browser/chromeos/login/user_manager.h" 10#include "chrome/browser/chromeos/system/statistics_provider.h" 11#include "chromeos/chromeos_constants.h" 12 13base::TimeDelta 14ChromeViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() { 15 // Enable password echo during OOBE when keyboard driven flag is set. 16 if (chromeos::UserManager::IsInitialized() && 17 !chromeos::UserManager::Get()->IsUserLoggedIn() && 18 !chromeos::StartupUtils::IsOobeCompleted()) { 19 bool keyboard_driven_oobe = false; 20 chromeos::system::StatisticsProvider::GetInstance()->GetMachineFlag( 21 chromeos::kOemKeyboardDrivenOobeKey, &keyboard_driven_oobe); 22 if (keyboard_driven_oobe) 23 return base::TimeDelta::FromSeconds(1); 24 } 25 26 return base::TimeDelta(); 27} 28