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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc

Issue 2841103002: Chromad: Add GetUserStatus call into AuthPolicyClient (Closed)
Patch Set: Fix test build Created 3 years, 7 months 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 | « chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h ('k') | chromeos/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/webui/chromeos/login/gaia_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h"
6 6
7 #include "ash/system/devicetype_utils.h" 7 #include "ash/system/devicetype_utils.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/guid.h" 10 #include "base/guid.h"
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 << "' authenticated by alias '" << canonicalized_email << "'."; 533 << "' authenticated by alias '" << canonicalized_email << "'.";
534 } 534 }
535 535
536 return account_id; 536 return account_id;
537 } 537 }
538 538
539 void GaiaScreenHandler::DoAdAuth( 539 void GaiaScreenHandler::DoAdAuth(
540 const std::string& username, 540 const std::string& username,
541 const Key& key, 541 const Key& key,
542 authpolicy::ErrorType error, 542 authpolicy::ErrorType error,
543 const authpolicy::ActiveDirectoryAccountData& account_data) { 543 const authpolicy::ActiveDirectoryAccountInfo& account_info) {
544 switch (error) { 544 switch (error) {
545 case authpolicy::ERROR_NONE: { 545 case authpolicy::ERROR_NONE: {
546 DCHECK(account_data.has_account_id() && 546 DCHECK(account_info.has_account_id() &&
547 !account_data.account_id().empty()); 547 !account_info.account_id().empty());
548 const AccountId account_id(GetAccountId( 548 const AccountId account_id(GetAccountId(
549 username, account_data.account_id(), AccountType::ACTIVE_DIRECTORY)); 549 username, account_info.account_id(), AccountType::ACTIVE_DIRECTORY));
550 Delegate()->SetDisplayAndGivenName(account_data.display_name(), 550 Delegate()->SetDisplayAndGivenName(account_info.display_name(),
551 account_data.given_name()); 551 account_info.given_name());
552 UserContext user_context(account_id); 552 UserContext user_context(account_id);
553 user_context.SetKey(key); 553 user_context.SetKey(key);
554 user_context.SetAuthFlow(UserContext::AUTH_FLOW_ACTIVE_DIRECTORY); 554 user_context.SetAuthFlow(UserContext::AUTH_FLOW_ACTIVE_DIRECTORY);
555 user_context.SetIsUsingOAuth(false); 555 user_context.SetIsUsingOAuth(false);
556 user_context.SetUserType( 556 user_context.SetUserType(
557 user_manager::UserType::USER_TYPE_ACTIVE_DIRECTORY); 557 user_manager::UserType::USER_TYPE_ACTIVE_DIRECTORY);
558 Delegate()->CompleteLogin(user_context); 558 Delegate()->CompleteLogin(user_context);
559 break; 559 break;
560 } 560 }
561 case authpolicy::ERROR_PASSWORD_EXPIRED: 561 case authpolicy::ERROR_PASSWORD_EXPIRED:
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { 975 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() {
976 return signin_screen_handler_->delegate_; 976 return signin_screen_handler_->delegate_;
977 } 977 }
978 978
979 bool GaiaScreenHandler::IsRestrictiveProxy() const { 979 bool GaiaScreenHandler::IsRestrictiveProxy() const {
980 return !disable_restrictive_proxy_check_for_test_ && 980 return !disable_restrictive_proxy_check_for_test_ &&
981 !IsOnline(captive_portal_status_); 981 !IsOnline(captive_portal_status_);
982 } 982 }
983 983
984 } // namespace chromeos 984 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h ('k') | chromeos/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698