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

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

Issue 1770533002: Change userid from a uint32_t to a string guid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@33connector
Patch Set: . Created 4 years, 9 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
Index: components/mus/ws/window_manager_factory_registry.cc
diff --git a/components/mus/ws/window_manager_factory_registry.cc b/components/mus/ws/window_manager_factory_registry.cc
index f861329f412732991f0b2bfb20d76e9777c8f66d..d7bb57622f506aaa94b751476814441214eb0279 100644
--- a/components/mus/ws/window_manager_factory_registry.cc
+++ b/components/mus/ws/window_manager_factory_registry.cc
@@ -24,7 +24,7 @@ WindowManagerFactoryRegistry::~WindowManagerFactoryRegistry() {
}
void WindowManagerFactoryRegistry::Register(
- UserId user_id,
+ const UserId& user_id,
mojo::InterfaceRequest<mojom::WindowManagerFactoryService> request) {
if (ContainsServiceForUser(user_id))
return;
@@ -58,7 +58,7 @@ void WindowManagerFactoryRegistry::AddServiceImpl(
}
bool WindowManagerFactoryRegistry::ContainsServiceForUser(
- UserId user_id) const {
+ const UserId& user_id) const {
for (auto& service_ptr : services_) {
if (service_ptr->user_id() == user_id) {
LOG(ERROR) << "WindowManagerFactoryService already registered for "
@@ -93,11 +93,11 @@ void WindowManagerFactoryRegistry::OnWindowManagerFactorySet(
connection_manager_->OnFirstWindowManagerFactorySet();
}
-void WindowManagerFactoryRegistry::OnActiveUserIdChanged(UserId id) {}
+void WindowManagerFactoryRegistry::OnActiveUserIdChanged(const UserId& id) {}
-void WindowManagerFactoryRegistry::OnUserIdAdded(UserId id) {}
+void WindowManagerFactoryRegistry::OnUserIdAdded(const UserId& id) {}
-void WindowManagerFactoryRegistry::OnUserIdRemoved(UserId id) {
+void WindowManagerFactoryRegistry::OnUserIdRemoved(const UserId& id) {
for (auto iter = services_.begin(); iter != services_.end(); ++iter) {
if ((*iter)->user_id() == id) {
services_.erase(iter);
« no previous file with comments | « components/mus/ws/window_manager_factory_registry.h ('k') | components/mus/ws/window_manager_factory_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698