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

Unified Diff: components/arc/arc_util.h

Issue 2890843002: Policy implementation for encryptfs to ext4 migration strategy (Closed)
Patch Set: Fixed review comments 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: components/arc/arc_util.h
diff --git a/components/arc/arc_util.h b/components/arc/arc_util.h
index d653b5ac43d054694f3efc53aa20fa11a76e8750..1341ae0e5f5d5fd5daacf6ac35915d955b43fde4 100644
--- a/components/arc/arc_util.h
+++ b/components/arc/arc_util.h
@@ -23,6 +23,19 @@ class User;
namespace arc {
+// The state of device policy DeviceEcryptfsMigrationStrategy, that points if
+// the migration to ext4 encryption is allowed. The ext4 encryption is required
+// for ARC(N+).
+// TODO(igorcov): Remove this after migration. crbug.com/725493
+enum ArcAvailabilityPolicyStatus {
hidehiko 2017/06/01 16:07:16 enum class, please.
+ // The policy value is unknown.
+ UNKNOWN = 0,
+ // ARC is disabled.
+ DISABLED = 1,
+ // ARC is available.
+ AVAILABLE = 2,
+};
+
// Returns true if ARC is installed and the current device is officially
// supported to run ARC.
// Note that, to run ARC practically, it is necessary to meet more conditions,
@@ -86,6 +99,16 @@ bool IsArcAppWindow(aura::Window* window);
// restricted CPU resources.
void SetArcCpuRestriction(bool do_restrict);
+// Getter for |arc_availability_policy_status|.
+ArcAvailabilityPolicyStatus GetArcAvailabilityPolicyStatus();
+
+// Set the flag that it's consumer owned device.
+void SetHasDeviceOwner();
+
+// For testing IsMigrationAllowed, the global flags have to be reset before
+// every test.
+void ResetGlobalDataForTesting();
+
} // namespace arc
#endif // COMPONENTS_ARC_ARC_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698