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

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

Issue 2732983002: Keep state even if AndroidManagement check returns MANAGED or ERROR. (Closed)
Patch Set: Created 3 years, 9 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
Index: chrome/browser/chromeos/arc/arc_session_manager.h
diff --git a/chrome/browser/chromeos/arc/arc_session_manager.h b/chrome/browser/chromeos/arc/arc_session_manager.h
index d5283fbd75554adedc906edc0dc2478b98a43025..ccee7ffbfeccec6727d038fe7db61fd26957f95c 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager.h
+++ b/chrome/browser/chromeos/arc/arc_session_manager.h
@@ -236,18 +236,28 @@ class ArcSessionManager : public ArcSessionRunner::Observer,
void SetState(State state);
void ShutdownSession();
- void OnAndroidManagementPassed();
void OnArcDataRemoved(bool success);
void OnArcSignInTimeout();
- void StartArcAndroidManagementCheck();
- void MaybeReenableArc();
+ // Starts Android management check. This is for first boot case (= Opt-in
+ // or OOBE flow case). In secondary or later ARC enabling, the check should
+ // run in background.
+ void StartAndroidManagementCheck();
// Called when the Android management check is done in opt-in flow or
- // re-auth flow.
+ // OOBE flow.
void OnAndroidManagementChecked(
policy::AndroidManagementClient::Result result);
+ // Starts Android management check in background (in parallel with starting
+ // ARC). This is for secondary or later ARC enabling.
+ // The reason running them in parallel is for performance. The secondary or
+ // later ARC enabling is typically on "logging into Chrome" for the user who
+ // already opted in to use Google Play Store. In such a case, network is
+ // typically not yet ready. Thus, if we block ARC boot, it delays several
+ // seconds, which is not very user friendly.
+ void StartBackgroundAndroidManagementCheck();
+
// Called when the background Android management check is done. It is
// triggered when the second or later ARC boot timing.
void OnBackgroundAndroidManagementChecked(
@@ -267,6 +277,12 @@ class ArcSessionManager : public ArcSessionRunner::Observer,
// ArcSessionRunner::Observer:
void OnSessionStopped(ArcStopReason reason, bool restarting) override;
+ // On ARC session stopped and/or data removal completion, this is called
hidehiko 2017/03/06 11:57:56 Updated, just because I'm here.
+ // so that, if necessary, ARC session is restarted.
+ // TODO(hidehiko): This can be removed after the racy state machine
+ // is fixed.
+ void MaybeReenableArc();
+
std::unique_ptr<ArcSessionRunner> arc_session_runner_;
// Unowned pointer. Keeps current profile.
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_session_manager.cc » ('j') | chrome/browser/chromeos/arc/arc_session_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698