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

Side by Side Diff: ash/test/test_session_controller_client.cc

Issue 2822033002: cros: Use SessionController to enable system tray settings / notifications tray (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "ash/test/test_session_controller_client.h" 5 #include "ash/test/test_session_controller_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/login_status.h" 10 #include "ash/login_status.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 void TestSessionControllerClient::AddUserSession( 98 void TestSessionControllerClient::AddUserSession(
99 const std::string& display_email) { 99 const std::string& display_email) {
100 mojom::UserSessionPtr session = mojom::UserSession::New(); 100 mojom::UserSessionPtr session = mojom::UserSession::New();
101 session->session_id = ++fake_session_id_; 101 session->session_id = ++fake_session_id_;
102 session->type = user_manager::USER_TYPE_REGULAR; 102 session->type = user_manager::USER_TYPE_REGULAR;
103 session->account_id = 103 session->account_id =
104 AccountId::FromUserEmail(GetUserIdFromEmail(display_email)); 104 AccountId::FromUserEmail(GetUserIdFromEmail(display_email));
105 session->display_name = "Über tray Über tray Über tray Über tray"; 105 session->display_name = "Über tray Über tray Über tray Über tray";
106 session->display_email = display_email; 106 session->display_email = display_email;
107 session->should_enable_settings = true;
108 session->should_show_notification_tray = true;
107 controller_->UpdateUserSession(std::move(session)); 109 controller_->UpdateUserSession(std::move(session));
108 } 110 }
109 111
110 void TestSessionControllerClient::UnlockScreen() { 112 void TestSessionControllerClient::UnlockScreen() {
111 SetSessionState(session_manager::SessionState::ACTIVE); 113 SetSessionState(session_manager::SessionState::ACTIVE);
112 } 114 }
113 115
114 void TestSessionControllerClient::RequestLockScreen() { 116 void TestSessionControllerClient::RequestLockScreen() {
115 SetSessionState(session_manager::SessionState::LOCKED); 117 SetSessionState(session_manager::SessionState::LOCKED);
116 } 118 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 if (it == sessions.end()) { 169 if (it == sessions.end()) {
168 NOTREACHED(); 170 NOTREACHED();
169 return; 171 return;
170 } 172 }
171 173
172 SwitchActiveUser((*it)->account_id); 174 SwitchActiveUser((*it)->account_id);
173 } 175 }
174 176
175 } // namespace test 177 } // namespace test
176 } // namespace ash 178 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698