| 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 c4d6754ad1b30a419d62ca494d8fea8fdd9a6739..00c5cb31db2f7046f9674fdc0f028e85731f6c10 100644
|
| --- a/chrome/browser/chromeos/arc/arc_session_manager.h
|
| +++ b/chrome/browser/chromeos/arc/arc_session_manager.h
|
| @@ -188,9 +188,6 @@ class ArcSessionManager : public ArcSessionRunner::Observer,
|
| void OnRetryClicked() override;
|
| void OnSendFeedbackClicked() override;
|
|
|
| - // Stops ARC without changing ArcEnabled preference.
|
| - void StopArc();
|
| -
|
| // StopArc(), then restart. Between them data clear may happens.
|
| // This is a special method to support enterprise device lost case.
|
| // This can be called only when ARC is running.
|
| @@ -207,8 +204,9 @@ class ArcSessionManager : public ArcSessionRunner::Observer,
|
| // and ArcAuthInfoFetcher.
|
| ArcAuthContext* auth_context() { return context_.get(); }
|
|
|
| - void StartArc();
|
| -
|
| + // On provisioning completion (regardless of whether successfully done or
|
| + // not), this is called with its status. On success, called with
|
| + // ProvisioningResult::SUCCESS, otherwise |result| is the error reason.
|
| void OnProvisioningFinished(ProvisioningResult result);
|
|
|
| // Returns the time when the sign in process started, or a null time if
|
| @@ -228,6 +226,10 @@ class ArcSessionManager : public ArcSessionRunner::Observer,
|
| // class. Should be used only for tests.
|
| bool IsPlaystoreLaunchRequestedForTesting() const;
|
|
|
| + // Invoking StartArc() only for testing, e.g., to emulate accepting Terms of
|
| + // Service then passing Android management check successfully.
|
| + void StartArcForTesting() { StartArc(); }
|
| +
|
| private:
|
| // RequestEnable() has a check in order not to trigger starting procedure
|
| // twice. This method can be called to bypass that check when restarting.
|
| @@ -261,6 +263,17 @@ class ArcSessionManager : public ArcSessionRunner::Observer,
|
| void OnBackgroundAndroidManagementChecked(
|
| policy::AndroidManagementClient::Result result);
|
|
|
| + // Requests to starts ARC instance. Also, update the internal state to
|
| + // ACTIVE.
|
| + void StartArc();
|
| +
|
| + // Requests to stop ARC instnace. This resets two persistent flags:
|
| + // kArcSignedIn and kArcTermsAccepted, so that, in next enabling,
|
| + // it is started from Terms of Service negotiation.
|
| + // TODO(hidehiko): Introduce STOPPING state, and this function should
|
| + // transition to it.
|
| + void StopArc();
|
| +
|
| // ArcSessionRunner::Observer:
|
| void OnSessionStopped(ArcStopReason reason, bool restarting) override;
|
|
|
|
|