OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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/views/chrome_views_delegate.h" | 5 #include "chrome/browser/ui/views/chrome_views_delegate.h" |
6 | 6 |
7 #include "base/time.h" | 7 #include "base/time.h" |
8 #include "chrome/browser/chromeos/login/startup_utils.h" | 8 #include "chrome/browser/chromeos/login/startup_utils.h" |
9 #include "chrome/browser/chromeos/login/user_manager.h" | 9 #include "chrome/browser/chromeos/login/user_manager.h" |
10 #include "chrome/browser/chromeos/system/statistics_provider.h" | 10 #include "chrome/browser/chromeos/system/statistics_provider.h" |
11 #include "chromeos/chromeos_constants.h" | 11 #include "chromeos/chromeos_constants.h" |
12 | 12 |
13 base::TimeDelta | 13 base::TimeDelta |
14 ChromeViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() { | 14 ChromeViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() { |
15 // Enable password echo during OOBE when keyboard driven flag is set. | 15 // Enable password echo during OOBE when keyboard driven flag is set. |
16 if (chromeos::UserManager::IsInitialized() && | 16 if (chromeos::UserManager::IsInitialized() && |
17 !chromeos::UserManager::Get()->IsUserLoggedIn() && | 17 !chromeos::UserManager::Get()->IsUserLoggedIn() && |
18 !chromeos::StartupUtils::IsOobeCompleted()) { | 18 !chromeos::StartupUtils::IsOobeCompleted()) { |
19 bool keyboard_driven_oobe = false; | 19 bool keyboard_driven_oobe = false; |
20 chromeos::system::StatisticsProvider::GetInstance()->GetMachineFlag( | 20 chromeos::system::StatisticsProvider::GetInstance()->GetMachineFlag( |
21 chromeos::kOemKeyboardDrivenOobeKey, &keyboard_driven_oobe); | 21 chromeos::system::kOemKeyboardDrivenOobeKey, &keyboard_driven_oobe); |
22 if (keyboard_driven_oobe) | 22 if (keyboard_driven_oobe) |
23 return base::TimeDelta::FromSeconds(1); | 23 return base::TimeDelta::FromSeconds(1); |
24 } | 24 } |
25 | 25 |
26 return base::TimeDelta(); | 26 return base::TimeDelta(); |
27 } | 27 } |
OLD | NEW |