| OLD | NEW |
| 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/ash/multi_user/multi_user_context_menu.h" | 5 #include "chrome/browser/ui/ash/multi_user/multi_user_context_menu.h" |
| 6 | 6 |
| 7 #include "ash/multi_profile_uma.h" | 7 #include "ash/multi_profile_uma.h" |
| 8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 : IDC_VISIT_DESKTOP_OF_LRU_USER_3, | 88 : IDC_VISIT_DESKTOP_OF_LRU_USER_3, |
| 89 l10n_util::GetStringFUTF16( | 89 l10n_util::GetStringFUTF16( |
| 90 IDS_VISIT_DESKTOP_OF_LRU_USER, | 90 IDS_VISIT_DESKTOP_OF_LRU_USER, |
| 91 user_info->GetDisplayName(), | 91 user_info->GetDisplayName(), |
| 92 base::ASCIIToUTF16(user_info->GetEmail()))); | 92 base::ASCIIToUTF16(user_info->GetEmail()))); |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 return model.Pass(); | 95 return model.Pass(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void OnAcceptTeleportWarning( | 98 void OnAcceptTeleportWarning(const std::string& user_id, |
| 99 const std::string user_id, aura::Window* window_, bool no_show_again) { | 99 aura::Window* window_, |
| 100 bool no_show_again) { |
| 100 PrefService* pref = ProfileManager::GetActiveUserProfile()->GetPrefs(); | 101 PrefService* pref = ProfileManager::GetActiveUserProfile()->GetPrefs(); |
| 101 pref->SetBoolean(prefs::kMultiProfileWarningShowDismissed, no_show_again); | 102 pref->SetBoolean(prefs::kMultiProfileWarningShowDismissed, no_show_again); |
| 102 | 103 |
| 103 ash::MultiProfileUMA::RecordTeleportAction( | 104 ash::MultiProfileUMA::RecordTeleportAction( |
| 104 ash::MultiProfileUMA::TELEPORT_WINDOW_CAPTION_MENU); | 105 ash::MultiProfileUMA::TELEPORT_WINDOW_CAPTION_MENU); |
| 105 | 106 |
| 106 chrome::MultiUserWindowManager::GetInstance()->ShowWindowForUser(window_, | 107 chrome::MultiUserWindowManager::GetInstance()->ShowWindowForUser(window_, |
| 107 user_id); | 108 user_id); |
| 108 } | 109 } |
| 109 | 110 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 139 return; | 140 return; |
| 140 } | 141 } |
| 141 } | 142 } |
| 142 chromeos::ShowMultiprofilesWarningDialog(on_accept); | 143 chromeos::ShowMultiprofilesWarningDialog(on_accept); |
| 143 return; | 144 return; |
| 144 } | 145 } |
| 145 default: | 146 default: |
| 146 NOTREACHED(); | 147 NOTREACHED(); |
| 147 } | 148 } |
| 148 } | 149 } |
| OLD | NEW |