Chromium Code Reviews| 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 bde8bbcccb9790e32ca1b3d2d55dd37595f61e2b..9a8c8cb676118da42113daaf46f7a3c85a96d5fb 100644 |
| --- a/chrome/browser/chromeos/arc/arc_util.h |
| +++ b/chrome/browser/chromeos/arc/arc_util.h |
| @@ -15,6 +15,12 @@ class Profile; |
| namespace arc { |
| +enum ArcAllowedForTestType { |
| + ALLOWEDFORSYNCTEST, |
|
hidehiko
2017/03/02 17:45:39
style: In chrome, we concat capital letter words w
|
| + DISALLOWEDFORTEST, |
| + NOTSET, |
| +}; |
| + |
| // 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 |
| @@ -22,14 +28,19 @@ namespace arc { |
| // nullptr can be safely passed to this function. In that case, returns false. |
| bool IsArcAllowedForProfile(const Profile* profile); |
| -// Disallows ARC for all profiles for testing. |
| +// 1.Type ALLOWEDFORSYNCTEST: Sets ARC as allowed for sync test. |
| +// In sync test, mutilpe ArcAppListPrefs are created and can confuse |
|
hidehiko
2017/03/02 17:45:39
nit: s/mutilpe/multiple/
|
| +// ArcSessionManager. Let IsArcAllowedForProfile() simply return true to |
|
hidehiko
2017/03/02 17:45:39
This is not really true, IIUC. If IsArcAllowedForP
|
| +// stop confusing ArcSessionManager. |
| +// 2.Type DISALLOWEDFORTEST: Disallows ARC for all profiles for testing. |
| // In most cases, disabling ARC should be done via commandline. However, |
| // there are some cases to be tested where ARC is available, but ARC is not |
| // supported for some reasons (e.g. incognito mode, supervised user, |
| // secondary profile). On the other hand, some test infra does not support |
| // such situations (e.g. API test). This is for workaround to emulate the |
| // case. |
| -void DisallowArcForTesting(); |
| +// 3.Type NOTSET: Goes through regular checks. |
| +void SetArcAllowedForTesting(ArcAllowedForTestType type); |
|
hidehiko
2017/03/02 17:45:39
Could you use the signature:
void SetArcAllowedFo
lgcheng
2017/03/02 23:45:10
Generally abandon modification for this file. Keep
|
| // Returns whether the user has opted in (or is opting in now) to use Google |
| // Play Store on ARC. |