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

Side by Side Diff: chrome/browser/chromeos/login/session/session_manager.cc

Issue 316863002: Rename "managed (mode|user)" to "supervised user" (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 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/session/session_manager.h" 5 #include "chrome/browser/chromeos/login/session/session_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 void SessionManager::InitProfilePreferences(Profile* profile, 372 void SessionManager::InitProfilePreferences(Profile* profile,
373 const std::string& user_id) { 373 const std::string& user_id) {
374 if (UserManager::Get()->IsCurrentUserNew()) 374 if (UserManager::Get()->IsCurrentUserNew())
375 SetFirstLoginPrefs(profile->GetPrefs()); 375 SetFirstLoginPrefs(profile->GetPrefs());
376 376
377 if (UserManager::Get()->IsLoggedInAsLocallyManagedUser()) { 377 if (UserManager::Get()->IsLoggedInAsLocallyManagedUser()) {
378 User* active_user = UserManager::Get()->GetActiveUser(); 378 User* active_user = UserManager::Get()->GetActiveUser();
379 std::string managed_user_sync_id = 379 std::string managed_user_sync_id =
380 UserManager::Get()->GetSupervisedUserManager()-> 380 UserManager::Get()->GetSupervisedUserManager()->
381 GetUserSyncId(active_user->email()); 381 GetUserSyncId(active_user->email());
382 profile->GetPrefs()->SetString(prefs::kManagedUserId, managed_user_sync_id); 382 profile->GetPrefs()->SetString(prefs::kSupervisedUserId,
383 managed_user_sync_id);
383 } else if (UserManager::Get()->IsLoggedInAsRegularUser()) { 384 } else if (UserManager::Get()->IsLoggedInAsRegularUser()) {
384 // Make sure that the google service username is properly set (we do this 385 // Make sure that the google service username is properly set (we do this
385 // on every sign in, not just the first login, to deal with existing 386 // on every sign in, not just the first login, to deal with existing
386 // profiles that might not have it set yet). 387 // profiles that might not have it set yet).
387 SigninManagerBase* signin_manager = 388 SigninManagerBase* signin_manager =
388 SigninManagerFactory::GetForProfile(profile); 389 SigninManagerFactory::GetForProfile(profile);
389 signin_manager->SetAuthenticatedUsername(user_id); 390 signin_manager->SetAuthenticatedUsername(user_id);
390 } 391 }
391 } 392 }
392 393
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 // recorded. 569 // recorded.
569 RLZTracker::InitRlzFromProfileDelayed( 570 RLZTracker::InitRlzFromProfileDelayed(
570 profile, UserManager::Get()->IsCurrentUserNew(), 571 profile, UserManager::Get()->IsCurrentUserNew(),
571 ping_delay < 0, base::TimeDelta::FromMilliseconds(abs(ping_delay))); 572 ping_delay < 0, base::TimeDelta::FromMilliseconds(abs(ping_delay)));
572 if (delegate_) 573 if (delegate_)
573 delegate_->OnRlzInitialized(); 574 delegate_->OnRlzInitialized();
574 #endif 575 #endif
575 } 576 }
576 577
577 } // namespace chromeos 578 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698