Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Unified Diff: chrome/browser/chromeos/arc/arc_util.cc

Issue 2711033002: Fix Arc integration test. (Closed)
Patch Set: Rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698