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

Side by Side Diff: chrome/browser/chromeos/login/screens/user_selection_screen.cc

Issue 2890843002: Policy implementation for encryptfs to ext4 migration strategy (Closed)
Patch Set: Merge done Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/login/screens/user_selection_screen.h" 5 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/location.h" 14 #include "base/location.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/memory/ptr_util.h" 16 #include "base/memory/ptr_util.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/browser_process_platform_part.h" 20 #include "chrome/browser/browser_process_platform_part.h"
21 #include "chrome/browser/chromeos/arc/arc_util.h"
21 #include "chrome/browser/chromeos/login/lock/screen_locker.h" 22 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
22 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.h" 23 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.h"
23 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h" 24 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h"
24 #include "chrome/browser/chromeos/login/reauth_stats.h" 25 #include "chrome/browser/chromeos/login/reauth_stats.h"
25 #include "chrome/browser/chromeos/login/ui/login_display_host.h" 26 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
26 #include "chrome/browser/chromeos/login/ui/views/user_board_view.h" 27 #include "chrome/browser/chromeos/login/ui/views/user_board_view.h"
27 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" 28 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
28 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" 29 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h"
29 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 30 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
30 #include "chrome/browser/chromeos/profiles/profile_helper.h" 31 #include "chrome/browser/chromeos/profiles/profile_helper.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 if (!quick_unlock_storage) 143 if (!quick_unlock_storage)
143 return false; 144 return false;
144 145
145 return quick_unlock_storage->IsFingerprintAuthenticationAvailable(); 146 return quick_unlock_storage->IsFingerprintAuthenticationAvailable();
146 } 147 }
147 148
148 // Returns true if dircrypto migration check should be performed. 149 // Returns true if dircrypto migration check should be performed.
149 bool ShouldCheckNeedDircryptoMigration() { 150 bool ShouldCheckNeedDircryptoMigration() {
150 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 151 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
151 switches::kDisableEncryptionMigration) && 152 switches::kDisableEncryptionMigration) &&
152 arc::IsArcAvailable(); 153 arc::IsArcAvailable() && arc::IsArcMigrationAllowed();
153 } 154 }
154 155
155 // Returns true if the user can run ARC based on the user type. 156 // Returns true if the user can run ARC based on the user type.
156 bool IsUserAllowedForARC(const AccountId& account_id) { 157 bool IsUserAllowedForARC(const AccountId& account_id) {
157 return user_manager::UserManager::IsInitialized() && 158 return user_manager::UserManager::IsInitialized() &&
158 arc::IsArcAllowedForUser( 159 arc::IsArcAllowedForUser(
159 user_manager::UserManager::Get()->FindUser(account_id)); 160 user_manager::UserManager::Get()->FindUser(account_id));
160 } 161 }
161 162
162 AccountId GetOwnerAccountId() { 163 AccountId GetOwnerAccountId() {
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 // The user profile should exist if and only if this is the lock screen. 818 // The user profile should exist if and only if this is the lock screen.
818 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); 819 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN);
819 820
820 if (!profile) 821 if (!profile)
821 profile = profile_helper->GetSigninProfile(); 822 profile = profile_helper->GetSigninProfile();
822 823
823 return EasyUnlockService::Get(profile); 824 return EasyUnlockService::Get(profile);
824 } 825 }
825 826
826 } // namespace chromeos 827 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698