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

Side by Side Diff: chrome/browser/chromeos/arc/arc_util.h

Issue 2702723002: Extract kArcEnabled preference from ArcSessionManager part 1. (Closed)
Patch Set: Address 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_
7 7
8 // Most utility should be put in components/arc/arc_util.{h,cc}, rather than 8 // Most utility should be put in components/arc/arc_util.{h,cc}, rather than
9 // here. However, some utility implementation requires other modules defined in 9 // here. However, some utility implementation requires other modules defined in
10 // chrome/, so this file contains such utilities. 10 // chrome/, so this file contains such utilities.
(...skipping 13 matching lines...) Expand all
24 24
25 // Disallows ARC for all profiles for testing. 25 // Disallows ARC for all profiles for testing.
26 // In most cases, disabling ARC should be done via commandline. However, 26 // In most cases, disabling ARC should be done via commandline. However,
27 // there are some cases to be tested where ARC is available, but ARC is not 27 // there are some cases to be tested where ARC is available, but ARC is not
28 // supported for some reasons (e.g. incognito mode, supervised user, 28 // supported for some reasons (e.g. incognito mode, supervised user,
29 // secondary profile). On the other hand, some test infra does not support 29 // secondary profile). On the other hand, some test infra does not support
30 // such situations (e.g. API test). This is for workaround to emulate the 30 // such situations (e.g. API test). This is for workaround to emulate the
31 // case. 31 // case.
32 void DisallowArcForTesting(); 32 void DisallowArcForTesting();
33 33
34 // Returns whether the user has opted in (or is opting in now) to use Google
35 // Play Store on ARC.
36 // This is almost equivalent to the value of "arc.enabled" preference. However,
37 // in addition, if ARC is not allowed for the given |profile|, then returns
38 // false. Please see detailed condition for the comment of
39 // IsArcAllowedForProfile().
40 // Note: For historical reason, the preference name is not matched with the
41 // actual meaning.
42 bool IsArcPlayStoreEnabledForProfile(const Profile* profile);
43
44 // Returns whether the preference "arc.enabled" is managed or not.
45 // It is requirement for a caller to ensure ARC is allowed for the user of
46 // the given |profile|.
47 bool IsArcPlayStoreEnabledPreferenceManagedForProfile(const Profile* profile);
48
49 // Enables or disables Google Play Store on ARC. Currently, it is tied to
50 // ARC enabled state, too, so this also should trigger to enable or disable
51 // whole ARC system.
52 // If the preference is managed, then no-op.
53 // It is requirement for a caller to ensure ARC is allowed for the user of
54 // the given |profile|.
55 // TODO(hidehiko): De-couple the concept to enable ARC system and opt-in
56 // to use Google Play Store. Note that there is a plan to use ARC without
57 // Google Play Store, then ARC can run without opt-in.
58 void SetArcPlayStoreEnabledForProfile(Profile* profile, bool enabled);
59
34 } // namespace arc 60 } // namespace arc
35 61
36 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_ 62 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_session_manager_unittest.cc ('k') | chrome/browser/chromeos/arc/arc_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698