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

Unified Diff: chrome/browser/signin/easy_unlock_service_regular.cc

Issue 981723007: Remove workaround for to disable EasyUnlock in ephemeral mode for tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | chrome/browser/signin/easy_unlock_service_unittest_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/easy_unlock_service_regular.cc
diff --git a/chrome/browser/signin/easy_unlock_service_regular.cc b/chrome/browser/signin/easy_unlock_service_regular.cc
index 96da4036e3ff4f86da2c0db735e84dc8db7bfd76..fef0f6ff7e9d7cbd5ad241038fa1cc96def5c7d9 100644
--- a/chrome/browser/signin/easy_unlock_service_regular.cc
+++ b/chrome/browser/signin/easy_unlock_service_regular.cc
@@ -294,19 +294,14 @@ void EasyUnlockServiceRegular::ShutdownInternal() {
bool EasyUnlockServiceRegular::IsAllowedInternal() const {
#if defined(OS_CHROMEOS)
- if (!user_manager::UserManager::Get()->IsLoggedInAsUserWithGaiaAccount())
+ user_manager::UserManager* user_manager = user_manager::UserManager::Get();
+ if (!user_manager->IsLoggedInAsUserWithGaiaAccount())
return false;
// TODO(tengs): Ephemeral accounts generate a new enrollment every time they
// are added, so disable Smart Lock to reduce enrollments on server. However,
// ephemeral accounts can be locked, so we should revisit this use case.
- // TODO(tengs): Remove this special case and test this code path after test
- // refactoring is landed (crbug.com/414829).
- const user_manager::User* user =
- chromeos::ProfileHelper::Get()->GetUserByProfile(profile());
- user_manager::UserManager* user_manager = user_manager::UserManager::Get();
- if (user->email() != chromeos::login::kStubUser &&
- user_manager->IsCurrentUserNonCryptohomeDataEphemeral())
+ if (user_manager->IsCurrentUserNonCryptohomeDataEphemeral())
return false;
if (!chromeos::ProfileHelper::IsPrimaryProfile(profile()))
« no previous file with comments | « no previous file | chrome/browser/signin/easy_unlock_service_unittest_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698