| 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 6a46751a502f52637d744aaf9d131aebcae3a377..7b08d72222e365de69c99de86b37318889af8f82 100644
|
| --- a/chrome/browser/chromeos/arc/arc_session_manager.cc
|
| +++ b/chrome/browser/chromeos/arc/arc_session_manager.cc
|
| @@ -426,7 +426,7 @@ void ArcSessionManager::SetProfile(Profile* profile) {
|
| !IsArcKioskMode()) {
|
| DCHECK(!support_host_);
|
| support_host_ = base::MakeUnique<ArcSupportHost>(profile_);
|
| - support_host_->AddObserver(this);
|
| + support_host_->SetErrorHandler(this);
|
| }
|
|
|
| DCHECK_EQ(State::NOT_INITIALIZED, state_);
|
| @@ -449,7 +449,6 @@ void ArcSessionManager::Shutdown() {
|
| ShutdownSession();
|
| if (support_host_) {
|
| support_host_->Close();
|
| - support_host_->RemoveObserver(this);
|
| support_host_.reset();
|
| }
|
| context_.reset();
|
| @@ -954,33 +953,16 @@ void ArcSessionManager::MaybeReenableArc() {
|
| }
|
|
|
| void ArcSessionManager::OnWindowClosed() {
|
| - DCHECK(support_host_);
|
| - if (terms_of_service_negotiator_) {
|
| - // In this case, ArcTermsOfServiceNegotiator should handle the case.
|
| - // Do nothing.
|
| - return;
|
| - }
|
| CancelAuthCode();
|
| }
|
|
|
| -void ArcSessionManager::OnTermsAgreed(bool is_metrics_enabled,
|
| - bool is_backup_and_restore_enabled,
|
| - bool is_location_service_enabled) {
|
| - DCHECK(support_host_);
|
| - DCHECK(terms_of_service_negotiator_);
|
| - // This should be handled in ArcTermsOfServiceNegotiator. Do nothing here.
|
| -}
|
| -
|
| void ArcSessionManager::OnRetryClicked() {
|
| DCHECK(support_host_);
|
|
|
| UpdateOptInActionUMA(OptInActionType::RETRY);
|
|
|
| // TODO(hidehiko): Simplify the retry logic.
|
| - if (terms_of_service_negotiator_) {
|
| - // Currently Terms of service is shown. ArcTermsOfServiceNegotiator should
|
| - // handle this.
|
| - } else if (!profile_->GetPrefs()->GetBoolean(prefs::kArcTermsAccepted)) {
|
| + if (!profile_->GetPrefs()->GetBoolean(prefs::kArcTermsAccepted)) {
|
| MaybeStartTermsOfServiceNegotiation();
|
| } else if (support_host_->ui_page() == ArcSupportHost::UIPage::ERROR &&
|
| !arc_session_runner_->IsStopped()) {
|
|
|