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

Unified Diff: chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc

Issue 2587993002: Chromad: Switch AuthPolicyClient to use cros_system_api enums. (Closed)
Patch Set: Switch to new universal enum type. Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
index 04bfa094866907afe74566ae2b705924915fc548..2329a8be5277332321b5890dc1455129d6973b22 100644
--- a/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
@@ -564,13 +564,16 @@ void EnrollmentScreenHandler::OnPasswordPipeReady(
void EnrollmentScreenHandler::HandleAdDomainJoin(
const std::string& machine_name,
const std::string& user_name,
- int code) {
- if (code == 0) {
- controller_->OnAdJoined(gaia::ExtractDomainName(user_name));
- return;
+ authpolicy::ErrorType code) {
+ switch (code) {
+ case authpolicy::ERROR_NONE:
+ controller_->OnAdJoined(gaia::ExtractDomainName(user_name));
+ return;
+ default:
stevenjb 2016/12/27 17:52:26 We should list the unhandled cases explicitly and
Roman Sorokin (ftl) 2016/12/28 11:04:09 I think it's better to put NOTREACHED() after the
+ // TODO(rsorokin): Add passing/displaying error codes. (see
+ // crbug.com/659984)
+ CallJS("invalidateAd", machine_name, user_name);
}
- // TODO(rsorokin): Add passing/displaying error codes. (see crbug.com/659984)
- CallJS("invalidateAd", machine_name, user_name);
}
void EnrollmentScreenHandler::HandleRetry() {

Powered by Google App Engine
This is Rietveld 408576698