| 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/common/shelf/shelf_delegate.h" | 9 #include "ash/common/shelf/shelf_delegate.h" |
| 10 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 // the user should not be able to continue until the bridge has stopped. | 846 // the user should not be able to continue until the bridge has stopped. |
| 847 ShowUI(UIPage::ERROR, l10n_util::GetStringUTF16( | 847 ShowUI(UIPage::ERROR, l10n_util::GetStringUTF16( |
| 848 IDS_ARC_SIGN_IN_SERVICE_UNAVAILABLE_ERROR)); | 848 IDS_ARC_SIGN_IN_SERVICE_UNAVAILABLE_ERROR)); |
| 849 return; | 849 return; |
| 850 } | 850 } |
| 851 | 851 |
| 852 SetState(State::FETCHING_CODE); | 852 SetState(State::FETCHING_CODE); |
| 853 | 853 |
| 854 if (initial_opt_in_) { | 854 if (initial_opt_in_) { |
| 855 initial_opt_in_ = false; | 855 initial_opt_in_ = false; |
| 856 ShowUI(UIPage::TERMS_PROGRESS, base::string16()); | 856 ShowUI(UIPage::TERMS, base::string16()); |
| 857 } else { | 857 } else { |
| 858 context_->PrepareContext(); | 858 context_->PrepareContext(); |
| 859 } | 859 } |
| 860 } | 860 } |
| 861 | 861 |
| 862 void ArcAuthService::OnPrepareContextFailed() { | 862 void ArcAuthService::OnPrepareContextFailed() { |
| 863 DCHECK_EQ(state_, State::FETCHING_CODE); | 863 DCHECK_EQ(state_, State::FETCHING_CODE); |
| 864 | 864 |
| 865 ShutdownBridgeAndShowUI( | 865 ShutdownBridgeAndShowUI( |
| 866 UIPage::ERROR, | 866 UIPage::ERROR, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 return os << "FETCHING_CODE"; | 966 return os << "FETCHING_CODE"; |
| 967 case ArcAuthService::State::ACTIVE: | 967 case ArcAuthService::State::ACTIVE: |
| 968 return os << "ACTIVE"; | 968 return os << "ACTIVE"; |
| 969 default: | 969 default: |
| 970 NOTREACHED(); | 970 NOTREACHED(); |
| 971 return os; | 971 return os; |
| 972 } | 972 } |
| 973 } | 973 } |
| 974 | 974 |
| 975 } // namespace arc | 975 } // namespace arc |
| OLD | NEW |