Chromium Code Reviews| Index: chrome/browser/signin/easy_unlock_service.cc |
| diff --git a/chrome/browser/signin/easy_unlock_service.cc b/chrome/browser/signin/easy_unlock_service.cc |
| index 2c90f81781a0094b4290c4402223538d4f5fdd1a..2219283607912f325b534920a4a4a9ef12bd25a8 100644 |
| --- a/chrome/browser/signin/easy_unlock_service.cc |
| +++ b/chrome/browser/signin/easy_unlock_service.cc |
| @@ -7,7 +7,6 @@ |
| #include "base/bind.h" |
| #include "base/command_line.h" |
| #include "base/logging.h" |
| -#include "base/metrics/field_trial.h" |
| #include "base/prefs/pref_registry_simple.h" |
| #include "base/prefs/pref_service.h" |
| #include "base/prefs/scoped_user_pref_update.h" |
| @@ -81,21 +80,8 @@ EasyUnlockService* EasyUnlockService::GetForUser( |
| // static |
| bool EasyUnlockService::IsSignInEnabled() { |
| - // Note: It's important to query the field trial state first, to ensure that |
| - // UMA reports the correct group. |
| - const std::string group = base::FieldTrialList::FindFullName("EasySignIn"); |
| - |
| - if (CommandLine::ForCurrentProcess()->HasSwitch( |
| - proximity_auth::switches::kDisableEasySignin)) { |
| - return false; |
| - } |
| - |
| - if (CommandLine::ForCurrentProcess()->HasSwitch( |
| - proximity_auth::switches::kEnableEasySignin)) { |
| - return true; |
| - } |
| - |
| - return group == "Enable"; |
| + return !CommandLine::ForCurrentProcess()->HasSwitch( |
| + proximity_auth::switches::kDisableEasySignin); |
|
Ilya Sherman
2014/12/05 23:22:07
I wonder whether it's still worth having separate
xiyuan
2014/12/06 00:36:23
Makes sense.
But found that we had a bug (http://
|
| } |
| class EasyUnlockService::BluetoothDetector |
| @@ -248,6 +234,11 @@ bool EasyUnlockService::IsAllowed() { |
| if (shut_down_) |
| return false; |
| + if (CommandLine::ForCurrentProcess()->HasSwitch( |
| + proximity_auth::switches::kDisableEasyUnlock)) { |
| + return false; |
| + } |
| + |
| if (!IsAllowedInternal()) |
| return false; |