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

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

Issue 2696553002: Fix incorrect DCHECK (Closed)
Patch Set: Back to DCHECK Created 3 years, 10 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 | « 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 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/common/system/chromeos/devicetype_utils.h" 7 #include "ash/common/system/chromeos/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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 return account_id; 503 return account_id;
504 } 504 }
505 505
506 void GaiaScreenHandler::DoAdAuth( 506 void GaiaScreenHandler::DoAdAuth(
507 const std::string& username, 507 const std::string& username,
508 const Key& key, 508 const Key& key,
509 authpolicy::ErrorType error, 509 authpolicy::ErrorType error,
510 const authpolicy::ActiveDirectoryAccountData& account_data) { 510 const authpolicy::ActiveDirectoryAccountData& account_data) {
511 switch (error) { 511 switch (error) {
512 case authpolicy::ERROR_NONE: { 512 case authpolicy::ERROR_NONE: {
513 DCHECK(!account_data.has_account_id() && 513 DCHECK(account_data.has_account_id() &&
514 !account_data.account_id().empty()); 514 !account_data.account_id().empty());
515 const AccountId account_id(GetAccountId( 515 const AccountId account_id(GetAccountId(
516 username, account_data.account_id(), AccountType::ACTIVE_DIRECTORY)); 516 username, account_data.account_id(), AccountType::ACTIVE_DIRECTORY));
517 Delegate()->SetDisplayAndGivenName(account_data.display_name(), 517 Delegate()->SetDisplayAndGivenName(account_data.display_name(),
518 account_data.given_name()); 518 account_data.given_name());
519 UserContext user_context(account_id); 519 UserContext user_context(account_id);
520 user_context.SetKey(key); 520 user_context.SetKey(key);
521 user_context.SetAuthFlow(UserContext::AUTH_FLOW_ACTIVE_DIRECTORY); 521 user_context.SetAuthFlow(UserContext::AUTH_FLOW_ACTIVE_DIRECTORY);
522 user_context.SetIsUsingOAuth(false); 522 user_context.SetIsUsingOAuth(false);
523 user_context.SetUserType( 523 user_context.SetUserType(
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 bool GaiaScreenHandler::IsRestrictiveProxy() const { 972 bool GaiaScreenHandler::IsRestrictiveProxy() const {
973 return !disable_restrictive_proxy_check_for_test_ && 973 return !disable_restrictive_proxy_check_for_test_ &&
974 !IsOnline(captive_portal_status_); 974 !IsOnline(captive_portal_status_);
975 } 975 }
976 976
977 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() { 977 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() {
978 disable_restrictive_proxy_check_for_test_ = true; 978 disable_restrictive_proxy_check_for_test_ = true;
979 } 979 }
980 980
981 } // namespace chromeos 981 } // namespace chromeos
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