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

Unified Diff: components/mus/ws/user_id_tracker.cc

Issue 2105483002: mus: Make sure only valid user-ids can be active. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/ws/display_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/user_id_tracker.cc
diff --git a/components/mus/ws/user_id_tracker.cc b/components/mus/ws/user_id_tracker.cc
index f80fe42436fbe0e67608ab0e29df224cd56d0eef..40a7dde987bd9f74b463080dda9920c8178034ae 100644
--- a/components/mus/ws/user_id_tracker.cc
+++ b/components/mus/ws/user_id_tracker.cc
@@ -13,6 +13,7 @@ namespace ws {
UserIdTracker::UserIdTracker() : active_id_(shell::mojom::kRootUserID) {
ids_.insert(active_id_);
}
+
UserIdTracker::~UserIdTracker() {
}
@@ -21,6 +22,7 @@ bool UserIdTracker::IsValidUserId(const UserId& id) const {
}
void UserIdTracker::SetActiveUserId(const UserId& id) {
+ DCHECK(IsValidUserId(id));
if (id == active_id_)
return;
« no previous file with comments | « components/mus/ws/display_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698