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

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

Issue 2119963002: Move mus to //services/ui (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/user_id.h ('k') | components/mus/ws/user_id_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/user_id_tracker.h
diff --git a/components/mus/ws/user_id_tracker.h b/components/mus/ws/user_id_tracker.h
deleted file mode 100644
index c0b2ca544070f5d441d2f2fecfc8a923d68f4690..0000000000000000000000000000000000000000
--- a/components/mus/ws/user_id_tracker.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_MUS_WS_USER_ID_TRACKER_H_
-#define COMPONENTS_MUS_WS_USER_ID_TRACKER_H_
-
-#include <stdint.h>
-
-#include <set>
-
-#include "base/macros.h"
-#include "base/observer_list.h"
-#include "components/mus/public/interfaces/user_access_manager.mojom.h"
-#include "components/mus/ws/user_id.h"
-#include "mojo/public/cpp/bindings/binding_set.h"
-
-namespace mus {
-namespace ws {
-
-class UserIdTrackerObserver;
-
-// Tracks the set of known/valid user ids.
-class UserIdTracker : public mojom::UserAccessManager {
- public:
- UserIdTracker();
- ~UserIdTracker() override;
-
- bool IsValidUserId(const UserId& id) const;
-
- const UserId& active_id() const { return active_id_; }
-
- // Adds a new known user. Does nothing if |id| is not known.
- void SetActiveUserId(const UserId& id);
- void AddUserId(const UserId& id);
- void RemoveUserId(const UserId& id);
-
- void AddObserver(UserIdTrackerObserver* observer);
- void RemoveObserver(UserIdTrackerObserver* observer);
-
- void Bind(mojom::UserAccessManagerRequest request);
-
- private:
- using UserIdSet = std::set<UserId>;
-
- // mojom::UserAccessManager:
- void SetActiveUser(const mojo::String& user_id) override;
-
- base::ObserverList<UserIdTrackerObserver> observers_;
-
- UserIdSet ids_;
- UserId active_id_;
-
- mojo::BindingSet<mojom::UserAccessManager> bindings_;
-
- DISALLOW_COPY_AND_ASSIGN(UserIdTracker);
-};
-
-} // namespace ws
-} // namespace mus
-
-#endif // COMPONENTS_MUS_WS_USER_ID_TRACKER_H_
« no previous file with comments | « components/mus/ws/user_id.h ('k') | components/mus/ws/user_id_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698