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

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

Issue 2890843002: Policy implementation for encryptfs to ext4 migration strategy (Closed)
Patch Set: Implementation Created 3 years, 7 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
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 16a3423ef690745f0015b5aa78707d00c877846e..14cdc39ea81fc5c7b4cbbcc4b02f8affbd0ba83d 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager.cc
@@ -631,7 +631,14 @@ void ArcSessionManager::RequestArcDataRemoval() {
profile_->GetPrefs()->SetBoolean(prefs::kArcDataRemoveRequested, true);
// To support 1) case above, maybe start data removal.
- if (state_ == State::STOPPED && arc_session_runner_->IsStopped())
+ // The ArcAvailabilityPolicyStatus check is added 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 ArcAvailabilityPolicyStatus check after migration.
+ // crbug.com/725493
+ if (state_ == State::STOPPED && arc_session_runner_->IsStopped() &&
+ arc::GetArcAvailabilityPolicyStatus() !=
hidehiko 2017/05/25 12:41:55 Setting kArcDataRemoveRequested pref needs to be g
igorcov 2017/05/31 17:25:35 Done.
+ arc::ARC_AVAILABILITY_POLICY_STATUS::DISABLED)
MaybeStartArcDataRemoval();
}

Powered by Google App Engine
This is Rietveld 408576698