| 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 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 // the user should not be able to continue until the bridge has stopped. | 844 // the user should not be able to continue until the bridge has stopped. |
| 845 ShowUI(UIPage::ERROR, l10n_util::GetStringUTF16( | 845 ShowUI(UIPage::ERROR, l10n_util::GetStringUTF16( |
| 846 IDS_ARC_SIGN_IN_SERVICE_UNAVAILABLE_ERROR)); | 846 IDS_ARC_SIGN_IN_SERVICE_UNAVAILABLE_ERROR)); |
| 847 return; | 847 return; |
| 848 } | 848 } |
| 849 | 849 |
| 850 SetState(State::FETCHING_CODE); | 850 SetState(State::FETCHING_CODE); |
| 851 | 851 |
| 852 if (initial_opt_in_) { | 852 if (initial_opt_in_) { |
| 853 initial_opt_in_ = false; | 853 initial_opt_in_ = false; |
| 854 ShowUI(UIPage::TERMS_PROGRESS, base::string16()); | 854 ShowUI(UIPage::TERMS, base::string16()); |
| 855 } else { | 855 } else { |
| 856 context_->PrepareContext(); | 856 context_->PrepareContext(); |
| 857 } | 857 } |
| 858 } | 858 } |
| 859 | 859 |
| 860 void ArcAuthService::OnPrepareContextFailed() { | 860 void ArcAuthService::OnPrepareContextFailed() { |
| 861 DCHECK_EQ(state_, State::FETCHING_CODE); | 861 DCHECK_EQ(state_, State::FETCHING_CODE); |
| 862 | 862 |
| 863 ShutdownBridgeAndShowUI( | 863 ShutdownBridgeAndShowUI( |
| 864 UIPage::ERROR, | 864 UIPage::ERROR, |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 return os << kStateFetchingCode; | 973 return os << kStateFetchingCode; |
| 974 case ArcAuthService::State::ACTIVE: | 974 case ArcAuthService::State::ACTIVE: |
| 975 return os << kStateActive; | 975 return os << kStateActive; |
| 976 default: | 976 default: |
| 977 NOTREACHED(); | 977 NOTREACHED(); |
| 978 return os; | 978 return os; |
| 979 } | 979 } |
| 980 } | 980 } |
| 981 | 981 |
| 982 } // namespace arc | 982 } // namespace arc |
| OLD | NEW |