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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 // Using SERVICE_UNAVAILABLE instead of UNKNOWN_ERROR, since the latter | 198 // Using SERVICE_UNAVAILABLE instead of UNKNOWN_ERROR, since the latter |
199 // causes this code to not try to stop ARC, so it would retry without the | 199 // causes this code to not try to stop ARC, so it would retry without the |
200 // user noticing. | 200 // user noticing. |
201 OnSignInFailed(mojom::ArcSignInFailureReason::SERVICE_UNAVAILABLE); | 201 OnSignInFailed(mojom::ArcSignInFailureReason::SERVICE_UNAVAILABLE); |
202 } | 202 } |
203 if (!clear_required_) | 203 if (!clear_required_) |
204 return; | 204 return; |
205 clear_required_ = false; | 205 clear_required_ = false; |
206 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->RemoveArcData( | 206 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->RemoveArcData( |
207 cryptohome::Identification( | 207 cryptohome::Identification( |
208 multi_user_util::GetAccountIdFromProfile(profile_))); | 208 multi_user_util::GetAccountIdFromProfile(profile_)), |
| 209 chromeos::SessionManagerClient::ArcCallback()); |
209 } | 210 } |
210 | 211 |
211 std::string ArcAuthService::GetAndResetAuthCode() { | 212 std::string ArcAuthService::GetAndResetAuthCode() { |
212 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 213 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
213 std::string auth_code; | 214 std::string auth_code; |
214 auth_code_.swap(auth_code); | 215 auth_code_.swap(auth_code); |
215 return auth_code; | 216 return auth_code; |
216 } | 217 } |
217 | 218 |
218 void ArcAuthService::GetAuthCodeDeprecated( | 219 void ArcAuthService::GetAuthCodeDeprecated( |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 return os << kStateFetchingCode; | 763 return os << kStateFetchingCode; |
763 case ArcAuthService::State::ACTIVE: | 764 case ArcAuthService::State::ACTIVE: |
764 return os << kStateActive; | 765 return os << kStateActive; |
765 default: | 766 default: |
766 NOTREACHED(); | 767 NOTREACHED(); |
767 return os; | 768 return os; |
768 } | 769 } |
769 } | 770 } |
770 | 771 |
771 } // namespace arc | 772 } // namespace arc |
OLD | NEW |