Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Side by Side Diff: chrome/browser/chromeos/arc/arc_auth_service.cc

Issue 2499933002: Remove ArcAuthService::GetAuthCodeDeprecated0() implementation. (Closed)
Patch Set: Address comment. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
358 // specify account type.
359 DCHECK(!IsArcKioskMode());
360 callback.Run(GetAndResetAuthCode());
361 } 357 }
362 358
363 void ArcAuthService::GetAuthCodeDeprecated( 359 void ArcAuthService::GetAuthCodeDeprecated(
364 const GetAuthCodeDeprecatedCallback& callback) { 360 const GetAuthCodeDeprecatedCallback& callback) {
365 // For robot account we must use RequestAccountInfo because it allows 361 // For robot account we must use RequestAccountInfo because it allows
366 // to specify account type. 362 // to specify account type.
367 DCHECK(!IsArcKioskMode()); 363 DCHECK(!IsArcKioskMode());
368 RequestAccountInfoInternal( 364 RequestAccountInfoInternal(
369 base::MakeUnique<ArcAuthService::AccountInfoNotifier>(callback)); 365 base::MakeUnique<ArcAuthService::AccountInfoNotifier>(callback));
370 } 366 }
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 return os << "FETCHING_CODE"; 1142 return os << "FETCHING_CODE";
1147 case ArcAuthService::State::ACTIVE: 1143 case ArcAuthService::State::ACTIVE:
1148 return os << "ACTIVE"; 1144 return os << "ACTIVE";
1149 default: 1145 default:
1150 NOTREACHED(); 1146 NOTREACHED();
1151 return os; 1147 return os;
1152 } 1148 }
1153 } 1149 }
1154 1150
1155 } // namespace arc 1151 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698