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

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: 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 unified diff | Download patch
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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 // Reset any pending request to re-enable ARC. 623 // Reset any pending request to re-enable ARC.
624 reenable_arc_ = false; 624 reenable_arc_ = false;
625 StopArc(); 625 StopArc();
626 VLOG(1) << "ARC opt-out. Removing user data."; 626 VLOG(1) << "ARC opt-out. Removing user data.";
627 RequestArcDataRemoval(); 627 RequestArcDataRemoval();
628 } 628 }
629 629
630 void ArcSessionManager::RequestArcDataRemoval() { 630 void ArcSessionManager::RequestArcDataRemoval() {
631 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 631 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
632 DCHECK(profile_); 632 DCHECK(profile_);
633
634 // The check if migration is allowed is done to make sure the data is not
635 // removed if the device had ARC enabled and became disabled as result of
636 // migration to ext4 policy.
637 // TODO(igorcov): Remove this check after migration. crbug.com/725493
638 if (!arc::IsArcMigrationAllowed()) {
hidehiko 2017/06/15 13:33:12 nit: Could you elide the brace for one-line if-sta
639 return;
640 }
641
633 // TODO(hidehiko): DCHECK the previous state. This is called for four cases; 642 // TODO(hidehiko): DCHECK the previous state. This is called for four cases;
634 // 1) Supporting managed user initial disabled case (Please see also 643 // 1) Supporting managed user initial disabled case (Please see also
635 // ArcPlayStoreEnabledPreferenceHandler::Start() for details). 644 // ArcPlayStoreEnabledPreferenceHandler::Start() for details).
636 // 2) Supporting enterprise triggered data removal. 645 // 2) Supporting enterprise triggered data removal.
637 // 3) One called in OnProvisioningFinished(). 646 // 3) One called in OnProvisioningFinished().
638 // 4) On request disabling. 647 // 4) On request disabling.
639 // After the state machine is fixed, 2) should be replaced by 648 // After the state machine is fixed, 2) should be replaced by
640 // RequestDisable() immediately followed by RequestEnable(). 649 // RequestDisable() immediately followed by RequestEnable().
641 // 3) and 4) are internal state transition. So, as for public interface, 1) 650 // 3) and 4) are internal state transition. So, as for public interface, 1)
642 // should be the only use case, and the |state_| should be limited to 651 // should be the only use case, and the |state_| should be limited to
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 1049
1041 #undef MAP_STATE 1050 #undef MAP_STATE
1042 1051
1043 // Some compilers report an error even if all values of an enum-class are 1052 // Some compilers report an error even if all values of an enum-class are
1044 // covered exhaustively in a switch statement. 1053 // covered exhaustively in a switch statement.
1045 NOTREACHED() << "Invalid value " << static_cast<int>(state); 1054 NOTREACHED() << "Invalid value " << static_cast<int>(state);
1046 return os; 1055 return os;
1047 } 1056 }
1048 1057
1049 } // namespace arc 1058 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_util.h » ('j') | chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698