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

Side by Side Diff: chrome/browser/chromeos/arc/arc_session_manager.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
« 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 // Reset any pending request to re-enable ARC. 630 // Reset any pending request to re-enable ARC.
631 reenable_arc_ = false; 631 reenable_arc_ = false;
632 StopArc(); 632 StopArc();
633 VLOG(1) << "ARC opt-out. Removing user data."; 633 VLOG(1) << "ARC opt-out. Removing user data.";
634 RequestArcDataRemoval(); 634 RequestArcDataRemoval();
635 } 635 }
636 636
637 void ArcSessionManager::RequestArcDataRemoval() { 637 void ArcSessionManager::RequestArcDataRemoval() {
638 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 638 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
639 DCHECK(profile_); 639 DCHECK(profile_);
640
641 // The check if migration is allowed is done to make sure the data is not
642 // removed if the device had ARC enabled and became disabled as result of
643 // migration to ext4 policy.
644 // TODO(igorcov): Remove this check after migration. crbug.com/725493
645 if (!arc::IsArcMigrationAllowed())
646 return;
647
640 // TODO(hidehiko): DCHECK the previous state. This is called for four cases; 648 // TODO(hidehiko): DCHECK the previous state. This is called for four cases;
641 // 1) Supporting managed user initial disabled case (Please see also 649 // 1) Supporting managed user initial disabled case (Please see also
642 // ArcPlayStoreEnabledPreferenceHandler::Start() for details). 650 // ArcPlayStoreEnabledPreferenceHandler::Start() for details).
643 // 2) Supporting enterprise triggered data removal. 651 // 2) Supporting enterprise triggered data removal.
644 // 3) One called in OnProvisioningFinished(). 652 // 3) One called in OnProvisioningFinished().
645 // 4) On request disabling. 653 // 4) On request disabling.
646 // After the state machine is fixed, 2) should be replaced by 654 // After the state machine is fixed, 2) should be replaced by
647 // RequestDisable() immediately followed by RequestEnable(). 655 // RequestDisable() immediately followed by RequestEnable().
648 // 3) and 4) are internal state transition. So, as for public interface, 1) 656 // 3) and 4) are internal state transition. So, as for public interface, 1)
649 // should be the only use case, and the |state_| should be limited to 657 // should be the only use case, and the |state_| should be limited to
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 1072
1065 #undef MAP_STATE 1073 #undef MAP_STATE
1066 1074
1067 // Some compilers report an error even if all values of an enum-class are 1075 // Some compilers report an error even if all values of an enum-class are
1068 // covered exhaustively in a switch statement. 1076 // covered exhaustively in a switch statement.
1069 NOTREACHED() << "Invalid value " << static_cast<int>(state); 1077 NOTREACHED() << "Invalid value " << static_cast<int>(state);
1070 return os; 1078 return os;
1071 } 1079 }
1072 1080
1073 } // namespace arc 1081 } // 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