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/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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 346 std::string ArcAuthService::GetAndResetAuthCode() { | 346 std::string ArcAuthService::GetAndResetAuthCode() { |
| 347 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 347 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 348 std::string auth_code; | 348 std::string auth_code; |
| 349 auth_code_.swap(auth_code); | 349 auth_code_.swap(auth_code); |
| 350 return auth_code; | 350 return auth_code; |
| 351 } | 351 } |
| 352 | 352 |
| 353 void ArcAuthService::GetAuthCodeDeprecated0( | 353 void ArcAuthService::GetAuthCodeDeprecated0( |
| 354 const GetAuthCodeDeprecated0Callback& callback) { | 354 const GetAuthCodeDeprecated0Callback& callback) { |
| 355 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 355 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 356 DCHECK(!IsOptInVerificationDisabled()); | 356 NOTREACHED() << "GetAuthCodeDeprecated0() should no longer be callable"; |
| 357 // For robot account we must use RequestAccountInfo because it allows to | 357 callback.Run(std::string()); |
|
hidehiko
2016/11/14 07:41:03
Because this should never be called, we may be abl
Luis Héctor Chávez
2016/11/14 16:07:52
yeah, we should drop it.
hidehiko
2016/11/14 17:54:51
Done.
| |
| 358 // specify account type. | |
| 359 DCHECK(!IsArcKioskMode()); | |
| 360 callback.Run(GetAndResetAuthCode()); | |
| 361 } | 358 } |
| 362 | 359 |
| 363 void ArcAuthService::GetAuthCodeDeprecated( | 360 void ArcAuthService::GetAuthCodeDeprecated( |
| 364 const GetAuthCodeDeprecatedCallback& callback) { | 361 const GetAuthCodeDeprecatedCallback& callback) { |
| 365 // For robot account we must use RequestAccountInfo because it allows | 362 // For robot account we must use RequestAccountInfo because it allows |
| 366 // to specify account type. | 363 // to specify account type. |
| 367 DCHECK(!IsArcKioskMode()); | 364 DCHECK(!IsArcKioskMode()); |
| 368 RequestAccountInfoInternal( | 365 RequestAccountInfoInternal( |
| 369 base::MakeUnique<ArcAuthService::AccountInfoNotifier>(callback)); | 366 base::MakeUnique<ArcAuthService::AccountInfoNotifier>(callback)); |
| 370 } | 367 } |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1146 return os << "FETCHING_CODE"; | 1143 return os << "FETCHING_CODE"; |
| 1147 case ArcAuthService::State::ACTIVE: | 1144 case ArcAuthService::State::ACTIVE: |
| 1148 return os << "ACTIVE"; | 1145 return os << "ACTIVE"; |
| 1149 default: | 1146 default: |
| 1150 NOTREACHED(); | 1147 NOTREACHED(); |
| 1151 return os; | 1148 return os; |
| 1152 } | 1149 } |
| 1153 } | 1150 } |
| 1154 | 1151 |
| 1155 } // namespace arc | 1152 } // namespace arc |
| OLD | NEW |