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

Side by Side Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 251703004: Do not set kGoogleServicesUsername for device-local accounts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/login_utils.h" 5 #include "chrome/browser/chromeos/login/login_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 UserManager::Get()->GetSupervisedUserManager()-> 458 UserManager::Get()->GetSupervisedUserManager()->
459 GetUserSyncId(active_user->email()); 459 GetUserSyncId(active_user->email());
460 460
461 // TODO(ibraaaa): Remove that when 97% of our users are using M31. 461 // TODO(ibraaaa): Remove that when 97% of our users are using M31.
462 // http://crbug.com/276163 462 // http://crbug.com/276163
463 if (managed_user_sync_id.empty()) 463 if (managed_user_sync_id.empty())
464 managed_user_sync_id = "DUMMY_ID"; 464 managed_user_sync_id = "DUMMY_ID";
465 465
466 user_profile->GetPrefs()->SetString(prefs::kManagedUserId, 466 user_profile->GetPrefs()->SetString(prefs::kManagedUserId,
467 managed_user_sync_id); 467 managed_user_sync_id);
468 } else { 468 } else if (UserManager::Get()->IsLoggedInAsRegularUser()) {
469 // Make sure that the google service username is properly set (we do this 469 // Make sure that the google service username is properly set (we do this
470 // on every sign in, not just the first login, to deal with existing 470 // on every sign in, not just the first login, to deal with existing
471 // profiles that might not have it set yet). 471 // profiles that might not have it set yet).
472 SigninManagerBase* signin_manager = 472 SigninManagerBase* signin_manager =
473 SigninManagerFactory::GetForProfile(user_profile); 473 SigninManagerFactory::GetForProfile(user_profile);
474 signin_manager->SetAuthenticatedUsername(user_id); 474 signin_manager->SetAuthenticatedUsername(user_id);
475 } 475 }
476 } 476 }
477 477
478 void LoginUtilsImpl::InitSessionRestoreStrategy() { 478 void LoginUtilsImpl::InitSessionRestoreStrategy() {
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 CrosSettings* cros_settings = CrosSettings::Get(); 957 CrosSettings* cros_settings = CrosSettings::Get();
958 bool allow_new_user = false; 958 bool allow_new_user = false;
959 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); 959 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
960 if (allow_new_user) 960 if (allow_new_user)
961 return true; 961 return true;
962 return cros_settings->FindEmailInList( 962 return cros_settings->FindEmailInList(
963 kAccountsPrefUsers, username, wildcard_match); 963 kAccountsPrefUsers, username, wildcard_match);
964 } 964 }
965 965
966 } // namespace chromeos 966 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/kiosk_browsertest.cc ('k') | chrome/browser/chromeos/policy/device_local_account_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698