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

Unified Diff: chrome/browser/ui/views/frame/system_menu_model_builder.cc

Issue 1428213004: This CL replaces std::string user_id in ash/* with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 5 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/system_menu_model_builder.cc
diff --git a/chrome/browser/ui/views/frame/system_menu_model_builder.cc b/chrome/browser/ui/views/frame/system_menu_model_builder.cc
index a1198fe396a6022fbe6b1f90ad477ac1d477c6c6..ea0d1cbc0de9d3b02f77493781b67415fcaefeb2 100644
--- a/chrome/browser/ui/views/frame/system_menu_model_builder.cc
+++ b/chrome/browser/ui/views/frame/system_menu_model_builder.cc
@@ -23,6 +23,7 @@
#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
#include "chrome/browser/ui/browser_window.h"
+#include "components/signin/core/account_id/account_id.h"
#include "components/user_manager/user_info.h"
#include "ui/base/l10n/l10n_util.h"
#endif
@@ -169,10 +170,11 @@ void SystemMenuModelBuilder::AppendTeleportMenu(ui::SimpleMenuModel* model) {
// is not owned by anyone, we don't show the menu addition.
chrome::MultiUserWindowManager* manager =
chrome::MultiUserWindowManager::GetInstance();
- const std::string user_id =
- multi_user_util::GetUserIDFromProfile(browser()->profile());
+ const AccountId account_id =
+ multi_user_util::GetAccountIdFromProfile(browser()->profile());
aura::Window* window = browser()->window()->GetNativeWindow();
- if (user_id.empty() || !window || manager->GetWindowOwner(window).empty())
+ if (!account_id.is_valid() || !window ||
+ !manager->GetWindowOwner(window).is_valid())
return;
model->AddSeparator(ui::NORMAL_SEPARATOR);
« no previous file with comments | « chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698