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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/existing_user_controller.h" 5 #include "chrome/browser/chromeos/login/existing_user_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.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/logging.h" 14 #include "base/logging.h"
15 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "base/metrics/histogram_macros.h" 16 #include "base/metrics/histogram_macros.h"
17 #include "base/strings/string_util.h" 17 #include "base/strings/string_util.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "base/version.h" 20 #include "base/version.h"
21 #include "chrome/browser/browser_process.h" 21 #include "chrome/browser/browser_process.h"
22 #include "chrome/browser/browser_process_platform_part.h" 22 #include "chrome/browser/browser_process_platform_part.h"
23 #include "chrome/browser/chrome_notification_types.h" 23 #include "chrome/browser/chrome_notification_types.h"
24 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" 24 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
25 #include "chrome/browser/chromeos/arc/arc_util.h"
25 #include "chrome/browser/chromeos/boot_times_recorder.h" 26 #include "chrome/browser/chromeos/boot_times_recorder.h"
26 #include "chrome/browser/chromeos/customization/customization_document.h" 27 #include "chrome/browser/chromeos/customization/customization_document.h"
27 #include "chrome/browser/chromeos/login/arc_kiosk_controller.h" 28 #include "chrome/browser/chromeos/login/arc_kiosk_controller.h"
28 #include "chrome/browser/chromeos/login/auth/chrome_login_performer.h" 29 #include "chrome/browser/chromeos/login/auth/chrome_login_performer.h"
29 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_user_context_initi alizer.h" 30 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_user_context_initi alizer.h"
30 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_user_flow.h" 31 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_user_flow.h"
31 #include "chrome/browser/chromeos/login/enterprise_user_session_metrics.h" 32 #include "chrome/browser/chromeos/login/enterprise_user_session_metrics.h"
32 #include "chrome/browser/chromeos/login/helper.h" 33 #include "chrome/browser/chromeos/login/helper.h"
33 #include "chrome/browser/chromeos/login/screens/encryption_migration_screen.h" 34 #include "chrome/browser/chromeos/login/screens/encryption_migration_screen.h"
34 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 35 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 bool ShouldForceDircrypto(const AccountId& account_id) { 183 bool ShouldForceDircrypto(const AccountId& account_id) {
183 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 184 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
184 chromeos::switches::kDisableEncryptionMigration)) { 185 chromeos::switches::kDisableEncryptionMigration)) {
185 return false; 186 return false;
186 } 187 }
187 // If the device is not officially supported to run ARC, we don't need to 188 // If the device is not officially supported to run ARC, we don't need to
188 // force Ext4 dircrypto. 189 // force Ext4 dircrypto.
189 if (!arc::IsArcAvailable()) 190 if (!arc::IsArcAvailable())
190 return false; 191 return false;
191 192
193 // If the device requires ecryptfs to ext4 migration policy check, and the
194 // policy doesn't allow the migration, then return.
195 if (!arc::IsArcMigrationAllowed())
196 return false;
197
192 // In some login flows (e.g. when siging in supervised user), ARC can not 198 // In some login flows (e.g. when siging in supervised user), ARC can not
193 // start. For such cases, we don't need to force Ext4 dircrypto. 199 // start. For such cases, we don't need to force Ext4 dircrypto.
194 chromeos::UserFlow* user_flow = 200 chromeos::UserFlow* user_flow =
195 chromeos::ChromeUserManager::Get()->GetUserFlow(account_id); 201 chromeos::ChromeUserManager::Get()->GetUserFlow(account_id);
196 if (!user_flow || !user_flow->CanStartArc()) 202 if (!user_flow || !user_flow->CanStartArc())
197 return false; 203 return false;
198 204
199 // When a user is signing in as a secondary user, we don't need to force Ext4 205 // When a user is signing in as a secondary user, we don't need to force Ext4
200 // dircrypto since the user can not run ARC. 206 // dircrypto since the user can not run ARC.
201 if (UserAddingScreen::Get()->IsRunning()) 207 if (UserAddingScreen::Get()->IsRunning())
(...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); 1504 login_display_->ShowUnrecoverableCrypthomeErrorDialog();
1499 } 1505 }
1500 1506
1501 void ExistingUserController::ClearRecordedNames() { 1507 void ExistingUserController::ClearRecordedNames() {
1502 display_email_.clear(); 1508 display_email_.clear();
1503 display_name_.clear(); 1509 display_name_.clear();
1504 given_name_.clear(); 1510 given_name_.clear();
1505 } 1511 }
1506 1512
1507 } // namespace chromeos 1513 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_util_unittest.cc ('k') | chrome/browser/chromeos/login/screens/user_selection_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698