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

Unified Diff: chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.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/chromeos/extensions/wallpaper_private_api_unittest.cc
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc
index ff3e942f9201f8f32eb6e53aa4392c7a30350d28..442884d02abf2fc7f927cdc1f8e7e0ce8b468fc6 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc
@@ -235,8 +235,8 @@ void WallpaperPrivateApiMultiUserUnittest::TearDown() {
void WallpaperPrivateApiMultiUserUnittest::SetUpMultiUserWindowManager(
const AccountId& active_account_id,
chrome::MultiUserWindowManager::MultiProfileMode mode) {
- multi_user_window_manager_ = new chrome::MultiUserWindowManagerChromeOS(
- active_account_id.GetUserEmail());
+ multi_user_window_manager_ =
+ new chrome::MultiUserWindowManagerChromeOS(active_account_id);
multi_user_window_manager_->Init();
chrome::MultiUserWindowManager::SetInstanceForTest(
multi_user_window_manager_, mode);
@@ -249,8 +249,7 @@ void WallpaperPrivateApiMultiUserUnittest::SetUpMultiUserWindowManager(
void WallpaperPrivateApiMultiUserUnittest::SwitchActiveUser(
const AccountId& active_account_id) {
fake_user_manager()->SwitchActiveUser(active_account_id);
- multi_user_window_manager_->ActiveUserChanged(
- active_account_id.GetUserEmail());
+ multi_user_window_manager_->ActiveUserChanged(active_account_id);
}
// In multi profile mode, user may open wallpaper picker in one profile and
@@ -273,18 +272,13 @@ TEST_F(WallpaperPrivateApiMultiUserUnittest, HideAndRestoreWindowsTwoUsers) {
ash::wm::WindowState* window3_state = ash::wm::GetWindowState(window3.get());
ash::wm::WindowState* window4_state = ash::wm::GetWindowState(window4.get());
- multi_user_window_manager()->SetWindowOwner(window0.get(),
- test_account_id1_.GetUserEmail());
- multi_user_window_manager()->SetWindowOwner(window1.get(),
- test_account_id1_.GetUserEmail());
+ multi_user_window_manager()->SetWindowOwner(window0.get(), test_account_id1_);
+ multi_user_window_manager()->SetWindowOwner(window1.get(), test_account_id1_);
// Set some windows to an inactive owner.
- multi_user_window_manager()->SetWindowOwner(window2.get(),
- test_account_id2_.GetUserEmail());
- multi_user_window_manager()->SetWindowOwner(window3.get(),
- test_account_id2_.GetUserEmail());
- multi_user_window_manager()->SetWindowOwner(window4.get(),
- test_account_id2_.GetUserEmail());
+ multi_user_window_manager()->SetWindowOwner(window2.get(), test_account_id2_);
+ multi_user_window_manager()->SetWindowOwner(window3.get(), test_account_id2_);
+ multi_user_window_manager()->SetWindowOwner(window4.get(), test_account_id2_);
EXPECT_FALSE(window0_state->IsMinimized());
EXPECT_FALSE(window1_state->IsMinimized());
@@ -377,20 +371,16 @@ TEST_F(WallpaperPrivateApiMultiUserUnittest, HideTeleportedWindow) {
ash::wm::WindowState* window2_state = ash::wm::GetWindowState(window2.get());
ash::wm::WindowState* window3_state = ash::wm::GetWindowState(window3.get());
- multi_user_window_manager()->SetWindowOwner(window0.get(),
- test_account_id1_.GetUserEmail());
- multi_user_window_manager()->SetWindowOwner(window1.get(),
- test_account_id1_.GetUserEmail());
+ multi_user_window_manager()->SetWindowOwner(window0.get(), test_account_id1_);
+ multi_user_window_manager()->SetWindowOwner(window1.get(), test_account_id1_);
// Set some windows to an inactive owner.
- multi_user_window_manager()->SetWindowOwner(window2.get(),
- test_account_id2_.GetUserEmail());
- multi_user_window_manager()->SetWindowOwner(window3.get(),
- test_account_id2_.GetUserEmail());
+ multi_user_window_manager()->SetWindowOwner(window2.get(), test_account_id2_);
+ multi_user_window_manager()->SetWindowOwner(window3.get(), test_account_id2_);
// Teleport window2 to kTestAccount1.
- multi_user_window_manager()->ShowWindowForUser(
- window2.get(), test_account_id1_.GetUserEmail());
+ multi_user_window_manager()->ShowWindowForUser(window2.get(),
+ test_account_id1_);
// Initial window state. All windows shouldn't be minimized.
EXPECT_FALSE(window0_state->IsMinimized());

Powered by Google App Engine
This is Rietveld 408576698