Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/arc/arc_auth_service.h" | 5 #include "chrome/browser/chromeos/arc/arc_auth_service.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/shelf/shelf_delegate.h" | 9 #include "ash/shelf/shelf_delegate.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 656 | 656 |
| 657 void ArcAuthService::DisableArc() { | 657 void ArcAuthService::DisableArc() { |
| 658 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 658 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 659 DCHECK(profile_); | 659 DCHECK(profile_); |
| 660 profile_->GetPrefs()->SetBoolean(prefs::kArcEnabled, false); | 660 profile_->GetPrefs()->SetBoolean(prefs::kArcEnabled, false); |
| 661 } | 661 } |
| 662 | 662 |
| 663 void ArcAuthService::StartUI() { | 663 void ArcAuthService::StartUI() { |
| 664 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 664 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 665 | 665 |
| 666 if (!arc_bridge_service()->stopped()) { | |
| 667 // If the user attempts to re-enable ARC while the bridge is still running | |
| 668 // data must be explicitly cleared and the user should not be able to | |
| 669 // continue until after the bridge has stopped. | |
| 670 clear_required_ = true; | |
|
hidehiko
2016/07/14 05:11:26
For the record of the offline chat.
Could you tak
| |
| 671 ShowUI(UIPage::ERROR, l10n_util::GetStringUTF16( | |
| 672 IDS_ARC_SIGN_IN_SERVICE_UNAVAILABLE_ERROR)); | |
| 673 return; | |
| 674 } | |
| 675 | |
| 666 SetState(State::FETCHING_CODE); | 676 SetState(State::FETCHING_CODE); |
| 667 | 677 |
| 668 if (initial_opt_in_) { | 678 if (initial_opt_in_) { |
| 669 initial_opt_in_ = false; | 679 initial_opt_in_ = false; |
| 670 ShowUI(UIPage::TERMS_PROGRESS, base::string16()); | 680 ShowUI(UIPage::TERMS_PROGRESS, base::string16()); |
| 671 } else { | 681 } else { |
| 672 context_->PrepareContext(); | 682 context_->PrepareContext(); |
| 673 } | 683 } |
| 674 } | 684 } |
| 675 | 685 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 751 return os << kStateFetchingCode; | 761 return os << kStateFetchingCode; |
| 752 case ArcAuthService::State::ACTIVE: | 762 case ArcAuthService::State::ACTIVE: |
| 753 return os << kStateActive; | 763 return os << kStateActive; |
| 754 default: | 764 default: |
| 755 NOTREACHED(); | 765 NOTREACHED(); |
| 756 return os; | 766 return os; |
| 757 } | 767 } |
| 758 } | 768 } |
| 759 | 769 |
| 760 } // namespace arc | 770 } // namespace arc |
| OLD | NEW |