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

Side by Side Diff: chrome/browser/chromeos/arc/arc_util.h

Issue 2788383003: ChromeOS: Disable ARC when incompatible filesystem is detected. (Closed)
Patch Set: AssertIOAllowed 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 unified diff | Download patch
OLDNEW
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 {
17 class FilePath;
18 }
19
16 namespace arc { 20 namespace arc {
17 21
18 // Returns true if ARC is allowed to run for the given profile. 22 // Returns true if ARC is allowed to run for the given profile.
19 // Otherwise, returns false, e.g. if the Profile is not for the primary user, 23 // Otherwise, returns false, e.g. if the Profile is not for the primary user,
20 // ARC is not available on the device, it is in the flow to set up managed 24 // ARC is not available on the device, it is in the flow to set up managed
21 // account creation. 25 // account creation.
22 // nullptr can be safely passed to this function. In that case, returns false. 26 // nullptr can be safely passed to this function. In that case, returns false.
23 bool IsArcAllowedForProfile(const Profile* profile); 27 bool IsArcAllowedForProfile(const Profile* profile);
24 28
25 // Disallows ARC for all profiles for testing. 29 // Disallows ARC for all profiles for testing.
(...skipping 28 matching lines...) Expand all
54 // the given |profile|. 58 // the given |profile|.
55 // TODO(hidehiko): De-couple the concept to enable ARC system and opt-in 59 // TODO(hidehiko): De-couple the concept to enable ARC system and opt-in
56 // to use Google Play Store. Note that there is a plan to use ARC without 60 // to use Google Play Store. Note that there is a plan to use ARC without
57 // Google Play Store, then ARC can run without opt-in. 61 // Google Play Store, then ARC can run without opt-in.
58 void SetArcPlayStoreEnabledForProfile(Profile* profile, bool enabled); 62 void SetArcPlayStoreEnabledForProfile(Profile* profile, bool enabled);
59 63
60 // Returns whether all ARC related OptIn preferences (i.e. 64 // Returns whether all ARC related OptIn preferences (i.e.
61 // ArcBackupRestoreEnabled and ArcLocationServiceEnabled) are managed. 65 // ArcBackupRestoreEnabled and ArcLocationServiceEnabled) are managed.
62 bool AreArcAllOptInPreferencesManagedForProfile(const Profile* profile); 66 bool AreArcAllOptInPreferencesManagedForProfile(const Profile* profile);
63 67
68 // Returns whether ARC can run on the filesystem mounted at |path|.
69 // This function should not run on UI/IO threads since it accesses files.
hidehiko 2017/04/04 18:35:12 Optional: how about "This function should run on t
kinaba 2017/04/05 02:35:28 Done.
70 bool IsArcCompatibleFilesystem(const base::FilePath& path);
71
64 } // namespace arc 72 } // namespace arc
65 73
66 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_ 74 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698