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

Side by Side Diff: chrome/browser/chromeos/arc/arc_session_manager.cc

Issue 2956633002: Policy implementation for encryptfs to ext4 migration strategy (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/arc/arc_session_manager.h" 5 #include "chrome/browser/chromeos/arc/arc_session_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 // Reset any pending request to re-enable ARC. 619 // Reset any pending request to re-enable ARC.
620 reenable_arc_ = false; 620 reenable_arc_ = false;
621 StopArc(); 621 StopArc();
622 VLOG(1) << "ARC opt-out. Removing user data."; 622 VLOG(1) << "ARC opt-out. Removing user data.";
623 RequestArcDataRemoval(); 623 RequestArcDataRemoval();
624 } 624 }
625 625
626 void ArcSessionManager::RequestArcDataRemoval() { 626 void ArcSessionManager::RequestArcDataRemoval() {
627 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 627 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
628 DCHECK(profile_); 628 DCHECK(profile_);
629
630 // The check if migration is allowed is done to make sure the data is not
631 // removed if the device had ARC enabled and became disabled as result of
632 // migration to ext4 policy.
633 // TODO(igorcov): Remove this check after migration. crbug.com/725493
634 if (!arc::IsArcMigrationAllowed())
635 return;
636
629 // TODO(hidehiko): DCHECK the previous state. This is called for four cases; 637 // TODO(hidehiko): DCHECK the previous state. This is called for four cases;
630 // 1) Supporting managed user initial disabled case (Please see also 638 // 1) Supporting managed user initial disabled case (Please see also
631 // ArcPlayStoreEnabledPreferenceHandler::Start() for details). 639 // ArcPlayStoreEnabledPreferenceHandler::Start() for details).
632 // 2) Supporting enterprise triggered data removal. 640 // 2) Supporting enterprise triggered data removal.
633 // 3) One called in OnProvisioningFinished(). 641 // 3) One called in OnProvisioningFinished().
634 // 4) On request disabling. 642 // 4) On request disabling.
635 // After the state machine is fixed, 2) should be replaced by 643 // After the state machine is fixed, 2) should be replaced by
636 // RequestDisable() immediately followed by RequestEnable(). 644 // RequestDisable() immediately followed by RequestEnable().
637 // 3) and 4) are internal state transition. So, as for public interface, 1) 645 // 3) and 4) are internal state transition. So, as for public interface, 1)
638 // should be the only use case, and the |state_| should be limited to 646 // should be the only use case, and the |state_| should be limited to
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 1058
1051 #undef MAP_STATE 1059 #undef MAP_STATE
1052 1060
1053 // Some compilers report an error even if all values of an enum-class are 1061 // Some compilers report an error even if all values of an enum-class are
1054 // covered exhaustively in a switch statement. 1062 // covered exhaustively in a switch statement.
1055 NOTREACHED() << "Invalid value " << static_cast<int>(state); 1063 NOTREACHED() << "Invalid value " << static_cast<int>(state);
1056 return os; 1064 return os;
1057 } 1065 }
1058 1066
1059 } // namespace arc 1067 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698