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

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

Issue 2711033002: Fix Arc integration test. (Closed)
Patch Set: Address hidehiko's comments. 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_util.cc » ('j') | chrome/browser/chromeos/arc/arc_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_util.cc » ('j') | chrome/browser/chromeos/arc/arc_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698