OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_ |
7 | 7 |
8 // Most utility should be put in components/arc/arc_util.{h,cc}, rather than | 8 // Most utility should be put in components/arc/arc_util.{h,cc}, rather than |
9 // here. However, some utility implementation requires other modules defined in | 9 // here. However, some utility implementation requires other modules defined in |
10 // chrome/, so this file contains such utilities. | 10 // chrome/, so this file contains such utilities. |
11 // Note that it is not allowed to have dependency from components/ to chrome/ | 11 // Note that it is not allowed to have dependency from components/ to chrome/ |
12 // by DEPS. | 12 // by DEPS. |
13 | 13 |
14 class Profile; | 14 class Profile; |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class FilePath; | 17 class FilePath; |
18 } | 18 } |
19 | 19 |
20 namespace arc { | 20 namespace arc { |
21 | 21 |
22 // Values to be stored in the local state preference to keep track of the | |
23 // filesystem encryption migration status. | |
24 enum FileSystemCompatibilityState { | |
Luis Héctor Chávez
2017/04/13 21:11:47
nit: enum FileSystemCompatibilityState : int32_t
kinaba
2017/04/14 04:33:55
Done.
| |
25 // No migiration has happend, user keeps using the old file system. | |
26 kFileSystemIncompatible = 0, | |
27 // Migration has happend. New filesystem is in use. | |
28 kFileSystemCompatible = 1, | |
29 // Migration has happend, and a notification about the fact was already shown. | |
30 kFileSystemCompatibleAndNotified = 2, | |
hidehiko
2017/04/13 12:38:27
This is not yet used. So how about;
- Move this de
kinaba
2017/04/14 04:33:55
Added a TODO comment.
| |
31 }; | |
32 | |
22 // Returns true if ARC is allowed to run for the given profile. | 33 // Returns true if ARC is allowed to run for the given profile. |
23 // Otherwise, returns false, e.g. if the Profile is not for the primary user, | 34 // Otherwise, returns false, e.g. if the Profile is not for the primary user, |
24 // ARC is not available on the device, it is in the flow to set up managed | 35 // ARC is not available on the device, it is in the flow to set up managed |
25 // account creation. | 36 // account creation. |
26 // nullptr can be safely passed to this function. In that case, returns false. | 37 // nullptr can be safely passed to this function. In that case, returns false. |
27 bool IsArcAllowedForProfile(const Profile* profile); | 38 bool IsArcAllowedForProfile(const Profile* profile); |
28 | 39 |
29 // Returns true if ARC app is allowed to show up on app list for the given | 40 // Returns true if ARC app is allowed to show up on app list for the given |
30 // profile. This can be a looser condition than IsArcAllowedForProfile. | 41 // profile. This can be a looser condition than IsArcAllowedForProfile. |
31 // ARC may be temporaliry disallowed for the profile, but it may become again | 42 // ARC may be temporaliry disallowed for the profile, but it may become again |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 // ArcBackupRestoreEnabled and ArcLocationServiceEnabled) are managed. | 89 // ArcBackupRestoreEnabled and ArcLocationServiceEnabled) are managed. |
79 bool AreArcAllOptInPreferencesManagedForProfile(const Profile* profile); | 90 bool AreArcAllOptInPreferencesManagedForProfile(const Profile* profile); |
80 | 91 |
81 // Returns whether ARC can run on the filesystem mounted at |path|. | 92 // Returns whether ARC can run on the filesystem mounted at |path|. |
82 // This function should run only on threads where IO operations are allowed. | 93 // This function should run only on threads where IO operations are allowed. |
83 bool IsArcCompatibleFilesystem(const base::FilePath& path); | 94 bool IsArcCompatibleFilesystem(const base::FilePath& path); |
84 | 95 |
85 } // namespace arc | 96 } // namespace arc |
86 | 97 |
87 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_ | 98 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_ |
OLD | NEW |