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

Unified Diff: chrome/browser/ui/ash/chrome_shell_content_state_chromeos.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
Index: chrome/browser/ui/ash/chrome_shell_content_state_chromeos.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_content_state_chromeos.cc b/chrome/browser/ui/ash/chrome_shell_content_state_chromeos.cc
index feae1a6a5d32ace4fccb30f8531e9f3d808fe9a8..0a220d3105117d951f623af54932f82c7b0d6d25 100644
--- a/chrome/browser/ui/ash/chrome_shell_content_state_chromeos.cc
+++ b/chrome/browser/ui/ash/chrome_shell_content_state_chromeos.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
+#include "components/signin/core/account_id/account_id.h"
#include "components/user_manager/user_manager.h"
#include "content/public/browser/browser_context.h"
@@ -25,18 +26,20 @@ content::BrowserContext* ChromeShellContentState::GetBrowserContextByIndex(
content::BrowserContext* ChromeShellContentState::GetBrowserContextForWindow(
aura::Window* window) {
- const std::string& user_id =
+ const AccountId& account_id =
chrome::MultiUserWindowManager::GetInstance()->GetWindowOwner(window);
- return user_id.empty() ? nullptr
- : multi_user_util::GetProfileFromUserID(user_id);
+ return account_id.is_valid()
+ ? multi_user_util::GetProfileFromAccountId(account_id)
+ : nullptr;
}
content::BrowserContext*
ChromeShellContentState::GetUserPresentingBrowserContextForWindow(
aura::Window* window) {
- const std::string& user_id =
+ const AccountId& account_id =
chrome::MultiUserWindowManager::GetInstance()->GetUserPresentingWindow(
window);
- return user_id.empty() ? nullptr
- : multi_user_util::GetProfileFromUserID(user_id);
+ return account_id.is_valid()
+ ? multi_user_util::GetProfileFromAccountId(account_id)
+ : nullptr;
}
« no previous file with comments | « chrome/browser/sync/sync_error_notifier_ash.cc ('k') | chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698