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

Unified Diff: chrome/browser/chromeos/arc/arc_util.h

Issue 2808353008: arc: kArcCompatibleFilesystemChosen pref to local state and integer. (Closed)
Patch Set: DISALLOW_COPY_AND_ASSIGN Created 3 years, 8 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
« no previous file with comments | « chrome/browser/chromeos/arc/arc_session_manager.cc ('k') | chrome/browser/chromeos/arc/arc_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_util.h
diff --git a/chrome/browser/chromeos/arc/arc_util.h b/chrome/browser/chromeos/arc/arc_util.h
index 7765832e9abad9327bef3b6adbac810e0718fc6c..80b8a9faa16b46519e0ec3406c1d21278e8ab8c8 100644
--- a/chrome/browser/chromeos/arc/arc_util.h
+++ b/chrome/browser/chromeos/arc/arc_util.h
@@ -5,12 +5,17 @@
#ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_
#define CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_
+#include <stdint.h>
+
+#include "base/callback_forward.h"
+
// Most utility should be put in components/arc/arc_util.{h,cc}, rather than
// here. However, some utility implementation requires other modules defined in
// chrome/, so this file contains such utilities.
// Note that it is not allowed to have dependency from components/ to chrome/
// by DEPS.
+class AccountId;
class Profile;
namespace base {
@@ -19,6 +24,22 @@ class FilePath;
namespace arc {
+// Values to be stored in the local state preference to keep track of the
+// filesystem encryption migration status.
+enum FileSystemCompatibilityState : int32_t {
+ // No migiration has happend, user keeps using the old file system.
+ kFileSystemIncompatible = 0,
Junichi Uekawa 2017/05/11 22:15:34 what about the case that the ext4 crypto is alread
+ // Migration has happend. New filesystem is in use.
+ kFileSystemCompatible = 1,
+ // Migration has happend, and a notification about the fact was already shown.
+ // TODO(kinaba): This value isn't yet used until crbug.com/711095 is done.
+ kFileSystemCompatibleAndNotified = 2,
+
+ // Existing code assumes that kFileSystemIncompatible is the only state
+ // representing incompatibility and other values are all variants of
+ // "compatible" state. Be careful in the case adding a new enum value.
+};
+
// Returns true if ARC is allowed to run for the given profile.
// Otherwise, returns false, e.g. if the Profile is not for the primary user,
// ARC is not available on the device, it is in the flow to set up managed
@@ -78,9 +99,13 @@ void SetArcPlayStoreEnabledForProfile(Profile* profile, bool enabled);
// ArcBackupRestoreEnabled and ArcLocationServiceEnabled) are managed.
bool AreArcAllOptInPreferencesManagedForProfile(const Profile* profile);
-// Returns whether ARC can run on the filesystem mounted at |path|.
-// This function should run only on threads where IO operations are allowed.
-bool IsArcCompatibleFilesystem(const base::FilePath& path);
+// Checks and updates the preference value whether the underlying filesystem
+// for the profile is compatible with ARC, when necessary. After it's done (or
+// skipped), |callback| is run either synchronously or asynchronously.
+void UpdateArcFileSystemCompatibilityPrefIfNeeded(
+ const AccountId& account_id,
+ const base::FilePath& profile_path,
+ const base::Closure& callback);
} // namespace arc
« no previous file with comments | « chrome/browser/chromeos/arc/arc_session_manager.cc ('k') | chrome/browser/chromeos/arc/arc_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698