| 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..3b2221b7353fb62b4bf4bab9ef767a13db818ada 100644
|
| --- a/chrome/browser/chromeos/arc/arc_util.cc
|
| +++ b/chrome/browser/chromeos/arc/arc_util.cc
|
| @@ -22,9 +22,17 @@ namespace {
|
| // Let IsAllowedForProfile() return "false" for any profile.
|
| bool g_disallow_for_testing = false;
|
|
|
| +// Let IsAllowedForProfile() return "true" for any profile in sync test.
|
| +bool g_allow_for_sync_testing = false;
|
| +
|
| } // namespace
|
|
|
| bool IsArcAllowedForProfile(const Profile* profile) {
|
| + if (g_allow_for_sync_testing) {
|
| + VLOG(1) << "ARC is allowed for sync test.";
|
| + return true;
|
| + }
|
| +
|
| if (g_disallow_for_testing) {
|
| VLOG(1) << "ARC is disallowed for testing.";
|
| return false;
|
| @@ -98,6 +106,10 @@ void DisallowArcForTesting() {
|
| g_disallow_for_testing = true;
|
| }
|
|
|
| +void SetArcAllowedForSyncTesting() {
|
| + g_allow_for_sync_testing = true;
|
| +}
|
| +
|
| bool IsArcPlayStoreEnabledForProfile(const Profile* profile) {
|
| return IsArcAllowedForProfile(profile) &&
|
| profile->GetPrefs()->GetBoolean(prefs::kArcEnabled);
|
|
|