| Index: chrome/browser/chromeos/arc/arc_session_manager.cc
|
| diff --git a/chrome/browser/chromeos/arc/arc_session_manager.cc b/chrome/browser/chromeos/arc/arc_session_manager.cc
|
| index 4ec1efcff246bb015106cfc74aefe45471945abf..470dc9bf38c3c8ce6e44624e8bcdf4f86afa8194 100644
|
| --- a/chrome/browser/chromeos/arc/arc_session_manager.cc
|
| +++ b/chrome/browser/chromeos/arc/arc_session_manager.cc
|
| @@ -471,16 +471,6 @@ void ArcSessionManager::Shutdown() {
|
| SetState(State::NOT_INITIALIZED);
|
| }
|
|
|
| -void ArcSessionManager::StopArc() {
|
| - if (state_ != State::STOPPED) {
|
| - profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, false);
|
| - profile_->GetPrefs()->SetBoolean(prefs::kArcTermsAccepted, false);
|
| - }
|
| - ShutdownSession();
|
| - if (support_host_)
|
| - support_host_->Close();
|
| -}
|
| -
|
| void ArcSessionManager::StartPreferenceHandler() {
|
| DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
| DCHECK(profile_);
|
| @@ -604,20 +594,6 @@ void ArcSessionManager::StopAndEnableArc() {
|
| StopArc();
|
| }
|
|
|
| -void ArcSessionManager::StartArc() {
|
| - DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
| -
|
| - // ARC must be started only if no pending data removal request exists.
|
| - DCHECK(!profile_->GetPrefs()->GetBoolean(prefs::kArcDataRemoveRequested));
|
| -
|
| - arc_start_time_ = base::Time::Now();
|
| -
|
| - provisioning_reported_ = false;
|
| -
|
| - arc_session_runner_->RequestStart();
|
| - SetState(State::ACTIVE);
|
| -}
|
| -
|
| void ArcSessionManager::OnArcSignInTimeout() {
|
| LOG(ERROR) << "Timed out waiting for first sign in.";
|
| OnProvisioningFinished(ProvisioningResult::OVERALL_SIGN_IN_TIMEOUT);
|
| @@ -905,6 +881,30 @@ void ArcSessionManager::OnBackgroundAndroidManagementChecked(
|
| }
|
| }
|
|
|
| +void ArcSessionManager::StartArc() {
|
| + DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
| +
|
| + // ARC must be started only if no pending data removal request exists.
|
| + DCHECK(!profile_->GetPrefs()->GetBoolean(prefs::kArcDataRemoveRequested));
|
| +
|
| + arc_start_time_ = base::Time::Now();
|
| +
|
| + provisioning_reported_ = false;
|
| +
|
| + arc_session_runner_->RequestStart();
|
| + SetState(State::ACTIVE);
|
| +}
|
| +
|
| +void ArcSessionManager::StopArc() {
|
| + if (state_ != State::STOPPED) {
|
| + profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, false);
|
| + profile_->GetPrefs()->SetBoolean(prefs::kArcTermsAccepted, false);
|
| + }
|
| + ShutdownSession();
|
| + if (support_host_)
|
| + support_host_->Close();
|
| +}
|
| +
|
| void ArcSessionManager::OnWindowClosed() {
|
| DCHECK(support_host_);
|
| if (terms_of_service_negotiator_) {
|
|
|