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

Side by Side Diff: chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc

Issue 2378043002: Remove IsUserAffiliated()'s obsolete dependency on enrollment domain. (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/login/users/chrome_user_manager_impl.h" 5 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <set> 10 #include <set>
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 const AffiliationIDSet& user_affiliation_ids) { 1207 const AffiliationIDSet& user_affiliation_ids) {
1208 const AccountId& account_id = 1208 const AccountId& account_id =
1209 user_manager::known_user::GetAccountId(user_email, std::string()); 1209 user_manager::known_user::GetAccountId(user_email, std::string());
1210 user_manager::User* user = FindUserAndModify(account_id); 1210 user_manager::User* user = FindUserAndModify(account_id);
1211 1211
1212 if (user) { 1212 if (user) {
1213 policy::BrowserPolicyConnectorChromeOS const* const connector = 1213 policy::BrowserPolicyConnectorChromeOS const* const connector =
1214 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 1214 g_browser_process->platform_part()->browser_policy_connector_chromeos();
1215 const bool is_affiliated = chromeos::IsUserAffiliated( 1215 const bool is_affiliated = chromeos::IsUserAffiliated(
1216 user_affiliation_ids, connector->GetDeviceAffiliationIDs(), 1216 user_affiliation_ids, connector->GetDeviceAffiliationIDs(),
1217 account_id.GetUserEmail(), connector->GetEnterpriseDomain()); 1217 account_id.GetUserEmail());
1218 user->SetAffiliation(is_affiliated); 1218 user->SetAffiliation(is_affiliated);
1219 1219
1220 if (user->GetType() == user_manager::USER_TYPE_REGULAR) { 1220 if (user->GetType() == user_manager::USER_TYPE_REGULAR) {
1221 if (is_affiliated) { 1221 if (is_affiliated) {
1222 AddReportingUser(account_id); 1222 AddReportingUser(account_id);
1223 } else { 1223 } else {
1224 RemoveReportingUser(account_id); 1224 RemoveReportingUser(account_id);
1225 } 1225 }
1226 } 1226 }
1227 } 1227 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 break; 1343 break;
1344 default: 1344 default:
1345 NOTREACHED(); 1345 NOTREACHED();
1346 break; 1346 break;
1347 } 1347 }
1348 1348
1349 return user; 1349 return user;
1350 } 1350 }
1351 1351
1352 } // namespace chromeos 1352 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698