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

Unified Diff: chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc b/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc
index 83c70f86ecf492f1d0da108eebfcbc52318525cf..26f18d576a1a51315df0f3fe48dda85f8ca149da 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc
@@ -75,7 +75,7 @@ scoped_ptr<ui::MenuModel> CreateMultiUserContextMenu(aura::Window* window) {
// If this window is not owned, we don't show the menu addition.
chrome::MultiUserWindowManager* manager =
chrome::MultiUserWindowManager::GetInstance();
- const std::string user_id = manager->GetWindowOwner(window);
+ const user_manager::UserID user_id = manager->GetWindowOwner(window);
if (user_id.empty() || !window)
return model.Pass();
chromeos::MultiUserContextMenuChromeos* menu =
@@ -96,7 +96,7 @@ scoped_ptr<ui::MenuModel> CreateMultiUserContextMenu(aura::Window* window) {
}
void OnAcceptTeleportWarning(
- const std::string user_id, aura::Window* window_, bool no_show_again) {
+ const user_manager::UserID user_id, aura::Window* window_, bool no_show_again) {
PrefService* pref = ProfileManager::GetActiveUserProfile()->GetPrefs();
pref->SetBoolean(prefs::kMultiProfileWarningShowDismissed, no_show_again);
@@ -113,7 +113,7 @@ void ExecuteVisitDesktopCommand(int command_id, aura::Window* window) {
case IDC_VISIT_DESKTOP_OF_LRU_USER_3: {
// When running the multi user mode on Chrome OS, windows can "visit"
// another user's desktop.
- const std::string& user_id =
+ const user_manager::UserID& user_id =
ash::Shell::GetInstance()
->session_state_delegate()
->GetUserInfo(IDC_VISIT_DESKTOP_OF_LRU_USER_2 == command_id ? 1
@@ -130,7 +130,7 @@ void ExecuteVisitDesktopCommand(int command_id, aura::Window* window) {
it != logged_in_users.end();
++it) {
if (multi_user_util::GetProfileFromUserID(
- multi_user_util::GetUserIDFromEmail((*it)->email()))->GetPrefs()->
+ multi_user_util::GetUserIDFromEmail((*it)->GetUserID().GetUserEmail()))->GetPrefs()->
GetBoolean(prefs::kMultiProfileWarningShowDismissed)) {
bool active_user_show_option =
ProfileManager::GetActiveUserProfile()->

Powered by Google App Engine
This is Rietveld 408576698