Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
|
Yusuke Sato
2017/02/23 00:47:13
In case you missed https://codereview.chromium.org
victorhsieh
2017/02/24 00:44:59
Thanks.
| |
| 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> |
| 11 | 11 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 // Exposed here for unit_tests validation. | 114 // Exposed here for unit_tests validation. |
| 115 static bool IsOobeOptInActive(); | 115 static bool IsOobeOptInActive(); |
| 116 | 116 |
| 117 // It is called from chrome/browser/prefs/browser_prefs.cc. | 117 // It is called from chrome/browser/prefs/browser_prefs.cc. |
| 118 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 118 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 119 | 119 |
| 120 static void DisableUIForTesting(); | 120 static void DisableUIForTesting(); |
| 121 static void SetShelfDelegateForTesting(ash::ShelfDelegate* shelf_delegate); | 121 static void SetShelfDelegateForTesting(ash::ShelfDelegate* shelf_delegate); |
| 122 static void EnableCheckAndroidManagementForTesting(); | 122 static void EnableCheckAndroidManagementForTesting(); |
| 123 | 123 |
| 124 // Returns true if ARC is allowed to run for the current session. | 124 // Returns true if Persistent ARC is enabled. |
| 125 static bool IsPersistentArc(); | |
|
Yusuke Sato
2017/02/23 00:47:13
I haven't reviewed this CL in detail yet, but the
hidehiko
2017/02/23 10:29:16
Makes sense. Another candidate is ShouldAlwaysRunA
hidehiko
2017/02/23 10:30:54
a bit bikeshedding: To be consistent with helper f
victorhsieh
2017/02/24 00:44:59
Done.
| |
| 126 | |
| 125 // TODO(hidehiko): The name is very close to IsArcAllowedForProfile(), but | 127 // TODO(hidehiko): The name is very close to IsArcAllowedForProfile(), but |
| 126 // has different meaning. Clean this up. | 128 // has different meaning. Clean this up. |
| 127 bool IsAllowed() const; | 129 bool IsAllowed() const; |
| 128 | 130 |
| 129 void OnPrimaryUserProfilePrepared(Profile* profile); | 131 void OnPrimaryUserProfilePrepared(Profile* profile); |
| 130 void Shutdown(); | 132 void Shutdown(); |
| 131 | 133 |
| 132 Profile* profile() { return profile_; } | 134 Profile* profile() { return profile_; } |
| 133 const Profile* profile() const { return profile_; } | 135 const Profile* profile() const { return profile_; } |
| 134 | 136 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 245 void SetState(State state); | 247 void SetState(State state); |
| 246 void ShutdownSession(); | 248 void ShutdownSession(); |
| 247 void OnOptInPreferenceChanged(); | 249 void OnOptInPreferenceChanged(); |
| 248 void OnAndroidManagementPassed(); | 250 void OnAndroidManagementPassed(); |
| 249 void OnArcDataRemoved(bool success); | 251 void OnArcDataRemoved(bool success); |
| 250 void OnArcSignInTimeout(); | 252 void OnArcSignInTimeout(); |
| 251 void FetchAuthCode(); | 253 void FetchAuthCode(); |
| 252 void PrepareContextForAuthCodeRequest(); | 254 void PrepareContextForAuthCodeRequest(); |
| 253 | 255 |
| 254 void StartArcAndroidManagementCheck(); | 256 void StartArcAndroidManagementCheck(); |
| 257 void StartArcAndroidManagementCheckedInBackground(); | |
| 255 void MaybeReenableArc(); | 258 void MaybeReenableArc(); |
| 256 | 259 |
| 257 // Called when the Android management check is done in opt-in flow or | 260 // Called when the Android management check is done in opt-in flow or |
| 258 // re-auth flow. | 261 // re-auth flow. |
| 259 void OnAndroidManagementChecked( | 262 void OnAndroidManagementChecked( |
| 260 policy::AndroidManagementClient::Result result); | 263 policy::AndroidManagementClient::Result result); |
| 261 | 264 |
| 262 // Called when the background Android management check is done. It is | 265 // Called when the background Android management check is done. It is |
| 263 // triggered when the second or later ARC boot timing. | 266 // triggered when the second or later ARC boot timing. |
| 264 void OnBackgroundAndroidManagementChecked( | 267 void OnBackgroundAndroidManagementChecked( |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 308 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager); | 311 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager); |
| 309 }; | 312 }; |
| 310 | 313 |
| 311 // Outputs the stringified |state| to |os|. This is only for logging purposes. | 314 // Outputs the stringified |state| to |os|. This is only for logging purposes. |
| 312 std::ostream& operator<<(std::ostream& os, | 315 std::ostream& operator<<(std::ostream& os, |
| 313 const ArcSessionManager::State& state); | 316 const ArcSessionManager::State& state); |
| 314 | 317 |
| 315 } // namespace arc | 318 } // namespace arc |
| 316 | 319 |
| 317 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ | 320 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ |
| OLD | NEW |