OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_AUTH_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <ostream> | 9 #include <ostream> |
10 #include <string> | 10 #include <string> |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 101 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
102 | 102 |
103 static void DisableUIForTesting(); | 103 static void DisableUIForTesting(); |
104 static void SetShelfDelegateForTesting(ash::ShelfDelegate* shelf_delegate); | 104 static void SetShelfDelegateForTesting(ash::ShelfDelegate* shelf_delegate); |
105 | 105 |
106 // Checks if OptIn verification was disabled by switch in command line. | 106 // Checks if OptIn verification was disabled by switch in command line. |
107 static bool IsOptInVerificationDisabled(); | 107 static bool IsOptInVerificationDisabled(); |
108 | 108 |
109 static void EnableCheckAndroidManagementForTesting(); | 109 static void EnableCheckAndroidManagementForTesting(); |
110 | 110 |
| 111 static bool IsAccountManaged(Profile* profile); |
| 112 |
111 // Returns true if Arc is allowed to run for the given profile. | 113 // Returns true if Arc is allowed to run for the given profile. |
112 static bool IsAllowedForProfile(const Profile* profile); | 114 static bool IsAllowedForProfile(const Profile* profile); |
113 | 115 |
114 // Returns true if Arc is allowed to run for the current session. | 116 // Returns true if Arc is allowed to run for the current session. |
115 bool IsAllowed() const; | 117 bool IsAllowed() const; |
116 | 118 |
117 void OnPrimaryUserProfilePrepared(Profile* profile); | 119 void OnPrimaryUserProfilePrepared(Profile* profile); |
118 void Shutdown(); | 120 void Shutdown(); |
119 | 121 |
120 Profile* profile() { return profile_; } | 122 Profile* profile() { return profile_; } |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; | 231 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; |
230 | 232 |
231 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); | 233 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); |
232 }; | 234 }; |
233 | 235 |
234 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); | 236 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); |
235 | 237 |
236 } // namespace arc | 238 } // namespace arc |
237 | 239 |
238 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ | 240 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ |
OLD | NEW |