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

Unified Diff: components/arc/arc_util.h

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: components/arc/arc_util.h
diff --git a/components/arc/arc_util.h b/components/arc/arc_util.h
index 2e5ddd37e5a58a793d996a62c06a0fc3d4aea272..11becc8228ccdfcaf02a54c1ac7f3775c9b0f471 100644
--- a/components/arc/arc_util.h
+++ b/components/arc/arc_util.h
@@ -19,6 +19,28 @@ class CommandLine;
namespace arc {
+constexpr char kAvailabilityOfficiallySupportedWithMigration[] =
+ "officially-supported-with-migration";
hidehiko 2017/05/25 12:41:56 As commented in design doc, could you introduce an
igorcov 2017/05/31 17:25:36 Done.
+
+// 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 ARC_AVAILABILITY_POLICY_STATUS {
hidehiko 2017/05/25 12:41:56 nit: please use enum class. style: Please use Cam
igorcov 2017/05/31 17:25:36 Done.
+ // The policy value is unknown.
+ UNKNOWN = 0,
+ // ARC is disabled.
+ DISABLED = 1,
+ // ARC is available.
+ AVAILABLE = 2,
+};
+
+// This flag should be set the first time the policy fetch is done. It is to be
+// used if the device is set to need ext4 migration. In case its value is
+// UNKNOWN, the device is considered consumer owned.
+// TODO(igorcov): Remove this after migration. crbug.com/725493
+extern ARC_AVAILABILITY_POLICY_STATUS arc_availability_policy_status;
hidehiko 2017/05/25 12:41:56 Please remove. extern decl is not needed.
igorcov 2017/05/31 17:25:36 Done.
+
// 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,
@@ -70,6 +92,12 @@ bool IsArcOptInVerificationDisabled();
// |window| is nullptr, returns false.
bool IsArcAppWindow(aura::Window* window);
+// Setter for |arc_availability_policy_status|.
+void SetArcAvailabilityPolicyStatus(ARC_AVAILABILITY_POLICY_STATUS status);
hidehiko 2017/05/25 12:41:56 Please explicitly document by-when this must be ca
+
+// Getter for |arc_availability_policy_status|.
+ARC_AVAILABILITY_POLICY_STATUS GetArcAvailabilityPolicyStatus();
+
} // namespace arc
#endif // COMPONENTS_ARC_ARC_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698