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 COMPONENTS_ARC_ARC_UTIL_H_ | 5 #ifndef COMPONENTS_ARC_ARC_UTIL_H_ |
6 #define COMPONENTS_ARC_ARC_UTIL_H_ | 6 #define COMPONENTS_ARC_ARC_UTIL_H_ |
7 | 7 |
8 // This file contains utility to see ARC functionality status controlled by | 8 // This file contains utility to see ARC functionality status controlled by |
9 // outside of ARC, e.g. CommandLine flag, attribute of global data/state, | 9 // outside of ARC, e.g. CommandLine flag, attribute of global data/state, |
10 // users' preferences, and FeatureList. | 10 // users' preferences, and FeatureList. |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class CommandLine; | 13 class CommandLine; |
14 } // namespace base | 14 } // namespace base |
15 | 15 |
16 namespace arc { | 16 namespace arc { |
17 | 17 |
18 // Returns true if ARC is installed and the current device is officially | 18 // Returns true if ARC is installed and the current device is officially |
19 // supported to run ARC. | 19 // supported to run ARC. |
20 // Note that, to run ARC practically, it is necessary to meet more conditions, | 20 // Note that, to run ARC practically, it is necessary to meet more conditions, |
21 // e.g., ARC supports only on Primary User Profile. To see if ARC can actually | 21 // e.g., ARC supports only on Primary User Profile. To see if ARC can actually |
22 // run for the profile etc., arc::ArcSessionManager::IsAllowedForProfile() is | 22 // run for the profile etc., arc::ArcSessionManager::IsAllowedForProfile() is |
23 // the function for that purpose. Please see also its comment, too. | 23 // the function for that purpose. Please see also its comment, too. |
24 // Also note that, ARC singleton classes (e.g. ArcSessionManager, | 24 // Also note that, ARC singleton classes (e.g. ArcSessionManager, |
25 // ArcServiceManager, ArcServiceLauncher) are instantiated regardless of this | 25 // ArcServiceManager, ArcServiceLauncher) are instantiated regardless of this |
26 // check, so it is ok to access them directly. | 26 // check, so it is ok to access them directly. |
27 bool IsArcAvailable(); | 27 bool IsArcAvailable(); |
28 | 28 |
29 // Returns true if ARC should always start within the primary user session | |
30 // (opted in user or not), and other supported mode such as guest and Kiosk | |
31 // mode. | |
32 bool ShouldAlwaysStartArc(); | |
Luis Héctor Chávez
2017/02/27 17:13:15
same here, ShouldArcStartAlways
victorhsieh
2017/02/28 18:57:33
Done.
| |
33 | |
34 // Enables to always start ARC for testing, by appending the command line flag. | |
35 void SetAlwaysStartArcForTesting(); | |
36 | |
29 // Returns true if ARC is installed and running ARC kiosk apps on the current | 37 // Returns true if ARC is installed and running ARC kiosk apps on the current |
30 // device is officially supported. | 38 // device is officially supported. |
31 // It doesn't follow that ARC is available for user sessions and | 39 // It doesn't follow that ARC is available for user sessions and |
32 // IsArcAvailable() will return true, although the reverse should be. | 40 // IsArcAvailable() will return true, although the reverse should be. |
33 // This is used to distinguish special cases when ARC kiosk is available on | 41 // This is used to distinguish special cases when ARC kiosk is available on |
34 // the device, but is not yet supported for regular user sessions. | 42 // the device, but is not yet supported for regular user sessions. |
35 // In most cases, IsArcAvailable() check should be used instead of this. | 43 // In most cases, IsArcAvailable() check should be used instead of this. |
36 // Also not that this function may return true when ARC is not running in | 44 // Also not that this function may return true when ARC is not running in |
37 // Kiosk mode, it checks only ARC Kiosk availability. | 45 // Kiosk mode, it checks only ARC Kiosk availability. |
38 bool IsArcKioskAvailable(); | 46 bool IsArcKioskAvailable(); |
(...skipping 15 matching lines...) Expand all Loading... | |
54 // devices. | 62 // devices. |
55 bool IsArcAllowedForActiveDirectoryUsers(); | 63 bool IsArcAllowedForActiveDirectoryUsers(); |
56 | 64 |
57 // Checks if opt-in verification was disabled by switch in command line. | 65 // Checks if opt-in verification was disabled by switch in command line. |
58 // In most cases, it is disabled for testing purpose. | 66 // In most cases, it is disabled for testing purpose. |
59 bool IsArcOptInVerificationDisabled(); | 67 bool IsArcOptInVerificationDisabled(); |
60 | 68 |
61 } // namespace arc | 69 } // namespace arc |
62 | 70 |
63 #endif // COMPONENTS_ARC_ARC_UTIL_H_ | 71 #endif // COMPONENTS_ARC_ARC_UTIL_H_ |
OLD | NEW |