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

Unified Diff: chrome/browser/chromeos/arc/arc_session_manager.cc

Issue 2890843002: Policy implementation for encryptfs to ext4 migration strategy (Closed)
Patch Set: Fixed review comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_util.h » ('j') | chrome/browser/chromeos/arc/arc_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_session_manager.cc
diff --git a/chrome/browser/chromeos/arc/arc_session_manager.cc b/chrome/browser/chromeos/arc/arc_session_manager.cc
index e623a1dbb05e09bc378f75f77cbe5a96511dab1e..b9af0c0b9d62997e32243090ee02eb4c4aad630d 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager.cc
@@ -629,6 +629,15 @@ void ArcSessionManager::RequestDisable() {
void ArcSessionManager::RequestArcDataRemoval() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(profile_);
+
+ // The check if migration is allowed is done to make sure the data is not
+ // removed if the device had ARC enabled and became disabled as result of
+ // migration to ext4 policy.
+ // TODO(igorcov): Remove this check after migration. crbug.com/725493
+ if (!arc::IsArcMigrationAllowed()) {
+ return;
bartfab (slow) 2017/06/12 12:49:03 Can we add a unit test for this? It would be very
igorcov 2017/06/12 16:50:09 As far as I understand the code, this should be a
+ }
+
// TODO(hidehiko): DCHECK the previous state. This is called for four cases;
// 1) Supporting managed user initial disabled case (Please see also
// ArcPlayStoreEnabledPreferenceHandler::Start() for details).
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_util.h » ('j') | chrome/browser/chromeos/arc/arc_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698