| 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_SESSION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <ostream> | 9 #include <ostream> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 static void SetShelfDelegateForTesting(ash::ShelfDelegate* shelf_delegate); | 128 static void SetShelfDelegateForTesting(ash::ShelfDelegate* shelf_delegate); |
| 129 | 129 |
| 130 // Checks if OptIn verification was disabled by switch in command line. | 130 // Checks if OptIn verification was disabled by switch in command line. |
| 131 static bool IsOptInVerificationDisabled(); | 131 static bool IsOptInVerificationDisabled(); |
| 132 | 132 |
| 133 static void EnableCheckAndroidManagementForTesting(); | 133 static void EnableCheckAndroidManagementForTesting(); |
| 134 | 134 |
| 135 // Returns true if Arc is allowed to run for the given profile. | 135 // Returns true if Arc is allowed to run for the given profile. |
| 136 static bool IsAllowedForProfile(const Profile* profile); | 136 static bool IsAllowedForProfile(const Profile* profile); |
| 137 | 137 |
| 138 // Disallows ARC for all profiles for testing. |
| 139 static void DisallowForTesting(); |
| 140 |
| 138 // Returns true if ARC should run under Kiosk mode. | 141 // Returns true if ARC should run under Kiosk mode. |
| 139 static bool IsArcKioskMode(); | 142 static bool IsArcKioskMode(); |
| 140 | 143 |
| 141 // Returns true if Arc is allowed to run for the current session. | 144 // Returns true if Arc is allowed to run for the current session. |
| 142 bool IsAllowed() const; | 145 bool IsAllowed() const; |
| 143 | 146 |
| 144 void OnPrimaryUserProfilePrepared(Profile* profile); | 147 void OnPrimaryUserProfilePrepared(Profile* profile); |
| 145 void Shutdown(); | 148 void Shutdown(); |
| 146 | 149 |
| 147 Profile* profile() { return profile_; } | 150 Profile* profile() { return profile_; } |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager); | 284 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager); |
| 282 }; | 285 }; |
| 283 | 286 |
| 284 // Outputs the stringified |state| to |os|. This is only for logging purposes. | 287 // Outputs the stringified |state| to |os|. This is only for logging purposes. |
| 285 std::ostream& operator<<(std::ostream& os, | 288 std::ostream& operator<<(std::ostream& os, |
| 286 const ArcSessionManager::State& state); | 289 const ArcSessionManager::State& state); |
| 287 | 290 |
| 288 } // namespace arc | 291 } // namespace arc |
| 289 | 292 |
| 290 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ | 293 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ |
| OLD | NEW |