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

Side by Side Diff: services/ui/ws/user_id_tracker.cc

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 years, 2 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
« no previous file with comments | « services/ui/ws/test_utils.cc ('k') | services/ui/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/ui/ws/user_id_tracker.h" 5 #include "services/ui/ws/user_id_tracker.h"
6 6
7 #include "services/service_manager/public/interfaces/connector.mojom.h" 7 #include "services/service_manager/public/interfaces/connector.mojom.h"
8 #include "services/ui/ws/user_id_tracker_observer.h" 8 #include "services/ui/ws/user_id_tracker_observer.h"
9 9
10 namespace ui { 10 namespace ui {
11 namespace ws { 11 namespace ws {
12 12
13 UserIdTracker::UserIdTracker() : active_id_(shell::mojom::kRootUserID) { 13 UserIdTracker::UserIdTracker()
14 : active_id_(service_manager::mojom::kRootUserID) {
14 ids_.insert(active_id_); 15 ids_.insert(active_id_);
15 } 16 }
16 17
17 UserIdTracker::~UserIdTracker() { 18 UserIdTracker::~UserIdTracker() {
18 } 19 }
19 20
20 bool UserIdTracker::IsValidUserId(const UserId& id) const { 21 bool UserIdTracker::IsValidUserId(const UserId& id) const {
21 return ids_.count(id) > 0; 22 return ids_.count(id) > 0;
22 } 23 }
23 24
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 60 }
60 61
61 void UserIdTracker::SetActiveUser(const mojo::String& user_id) { 62 void UserIdTracker::SetActiveUser(const mojo::String& user_id) {
62 if (!IsValidUserId(user_id)) 63 if (!IsValidUserId(user_id))
63 AddUserId(user_id); 64 AddUserId(user_id);
64 SetActiveUserId(user_id); 65 SetActiveUserId(user_id);
65 } 66 }
66 67
67 } // namespace ws 68 } // namespace ws
68 } // namespace ui 69 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/test_utils.cc ('k') | services/ui/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698