Chromium Code Reviews| Index: chrome/browser/chromeos/arc/arc_util.cc |
| diff --git a/chrome/browser/chromeos/arc/arc_util.cc b/chrome/browser/chromeos/arc/arc_util.cc |
| index 49b6f04bdf062d1d444ff68f48c80ec53804ce3b..180112a61546f5ca4335e98955cdc2ebb2a47f6a 100644 |
| --- a/chrome/browser/chromeos/arc/arc_util.cc |
| +++ b/chrome/browser/chromeos/arc/arc_util.cc |
| @@ -18,16 +18,19 @@ |
| namespace arc { |
| namespace { |
|
lgcheng
2017/02/25 01:40:38
Comments for type are in util.h.
|
| - |
| -// Let IsAllowedForProfile() return "false" for any profile. |
| -bool g_disallow_for_testing = false; |
| - |
| +ArcAllowedForTestType g_arc_allowed_for_test_type = NOTSET; |
| } // namespace |
| bool IsArcAllowedForProfile(const Profile* profile) { |
| - if (g_disallow_for_testing) { |
| - VLOG(1) << "ARC is disallowed for testing."; |
| - return false; |
| + switch (g_arc_allowed_for_test_type) { |
| + case ALLOWEDFORSYNCTEST: |
| + return true; |
| + case DISALLOWEDFORTEST: |
| + return false; |
| + // Goes through regular checks. |
| + case NOTSET: |
| + default: |
|
hidehiko
2017/03/02 17:45:39
No default section please.
cf) arc++chromium-style
lgcheng
2017/03/02 23:45:10
Modification for this file is abandoned.
|
| + break; |
| } |
| // ARC Kiosk can be enabled even if ARC is not yet supported on the device. |
| @@ -94,8 +97,8 @@ bool IsArcAllowedForProfile(const Profile* profile) { |
| return true; |
| } |
| -void DisallowArcForTesting() { |
| - g_disallow_for_testing = true; |
| +void SetArcAllowedForTesting(ArcAllowedForTestType type) { |
| + g_arc_allowed_for_test_type = type; |
| } |
| bool IsArcPlayStoreEnabledForProfile(const Profile* profile) { |