| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_ |
| 7 |
| 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 |
| 10 // chrome/, so this file contains such utilities. |
| 11 // Note that it is not allowed to have dependency from components/ to chrome/ |
| 12 // by DEPS. |
| 13 |
| 14 class Profile; |
| 15 |
| 16 namespace arc { |
| 17 |
| 18 // 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, |
| 20 // ARC is not available on the device, it is in the flow to set up managed |
| 21 // account creation. |
| 22 // nullptr can be safely passed to this function. In that case, returns false. |
| 23 bool IsArcAllowedForProfile(const Profile* profile); |
| 24 |
| 25 // Disallows ARC for all profiles for testing. |
| 26 // In most cases, disabling ARC should be done via commandline. However, |
| 27 // there are some cases to be tested where ARC is available, but ARC is not |
| 28 // supported for some reasons (e.g. incognito mode, supervised user, |
| 29 // secondary profile). On the other hand, some test infra does not support |
| 30 // such situations (e.g. API test). This is for workaround to emulate the |
| 31 // case. |
| 32 void DisallowArcForTesting(); |
| 33 |
| 34 } // namespace arc |
| 35 |
| 36 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_ |
| OLD | NEW |