| 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 9aa0ca8a679e8747799534a09fcd9e48fc1422e3..1f23796bd658fec2b60fe15f2af47d4bd0373831 100644
|
| --- a/chrome/browser/chromeos/arc/arc_session_manager.h
|
| +++ b/chrome/browser/chromeos/arc/arc_session_manager.h
|
| @@ -173,6 +173,13 @@ class ArcSessionManager : public ArcSessionRunner::Observer,
|
| // If it is already requested to disable, no-op.
|
| void RequestDisable();
|
|
|
| + // Requests to remove the ARC data.
|
| + // If ARC is stopped, triggers to remove the data. Otherwise, queues to
|
| + // remove the data after ARC stops.
|
| + // A log statement with the removal reason must be added prior to calling
|
| + // this.
|
| + void RequestArcDataRemoval();
|
| +
|
| // Called from the Chrome OS metrics provider to record Arc.State
|
| // periodically.
|
| void RecordArcState();
|
| @@ -190,11 +197,6 @@ class ArcSessionManager : public ArcSessionRunner::Observer,
|
| // This can be called only when ARC is running.
|
| void StopAndEnableArc();
|
|
|
| - // Removes the data if ARC is stopped. Otherwise, queue to remove the data
|
| - // on ARC is stopped. A log statement with the removal reason must be added
|
| - // prior to calling RemoveArcData().
|
| - void RemoveArcData();
|
| -
|
| ArcSupportHost* support_host() { return support_host_.get(); }
|
|
|
| // TODO(hidehiko): Get rid of the getter by migration between ArcAuthContext
|
| @@ -232,8 +234,9 @@ class ArcSessionManager : public ArcSessionRunner::Observer,
|
| // twice. This method can be called to bypass that check when restarting.
|
| void RequestEnableImpl();
|
|
|
| - // Negotiates the terms of service to user.
|
| - void StartTermsOfServiceNegotiation();
|
| + // Negotiates the terms of service to user, if necessary.
|
| + // Otherwise, move to StartAndroidManagementCheck().
|
| + void MaybeStartTermsOfServiceNegotiation();
|
| void OnTermsOfServiceNegotiated(bool accepted);
|
|
|
| // Returns true if Terms of Service negotiation is needed. Otherwise false.
|
| @@ -243,7 +246,6 @@ class ArcSessionManager : public ArcSessionRunner::Observer,
|
|
|
| void SetState(State state);
|
| void ShutdownSession();
|
| - void OnArcDataRemoved(bool success);
|
| void OnArcSignInTimeout();
|
|
|
| // Starts Android management check. This is for first boot case (= Opt-in
|
| @@ -284,6 +286,13 @@ class ArcSessionManager : public ArcSessionRunner::Observer,
|
| // ArcSessionRunner::Observer:
|
| void OnSessionStopped(ArcStopReason reason, bool restarting) override;
|
|
|
| + // Starts to remove ARC data, if it is requested via RequestArcDataRemoval().
|
| + // On completion, OnArcDataRemoved() is called.
|
| + // If not requested, just skipping the data removal, and moves to
|
| + // MaybeReenableArc() directly.
|
| + void MaybeStartArcDataRemoval();
|
| + void OnArcDataRemoved(bool success);
|
| +
|
| // On ARC session stopped and/or data removal completion, this is called
|
| // so that, if necessary, ARC session is restarted.
|
| // TODO(hidehiko): This can be removed after the racy state machine
|
|
|