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

Unified Diff: services/service_manager/public/cpp/lib/identity.cc

Issue 2860023002: Eliminate lib directory for service manager client lib. (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 side-by-side diff with in-line comments
Download patch
Index: services/service_manager/public/cpp/lib/identity.cc
diff --git a/services/service_manager/public/cpp/lib/identity.cc b/services/service_manager/public/cpp/lib/identity.cc
deleted file mode 100644
index 0a4abb45659b88f49a187f23261113fd36ff018b..0000000000000000000000000000000000000000
--- a/services/service_manager/public/cpp/lib/identity.cc
+++ /dev/null
@@ -1,50 +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.
-
-#include "services/service_manager/public/cpp/identity.h"
-
-#include "base/guid.h"
-#include "services/service_manager/public/interfaces/connector.mojom.h"
-
-namespace service_manager {
-
-Identity::Identity() : Identity("") {}
-
-Identity::Identity(const std::string& name)
- : Identity(name, mojom::kInheritUserID) {}
-
-Identity::Identity(const std::string& name, const std::string& user_id)
- : Identity(name, user_id, "") {}
-
-Identity::Identity(const std::string& name, const std::string& user_id,
- const std::string& instance)
- : name_(name),
- user_id_(user_id),
- instance_(instance) {
- DCHECK(!user_id.empty());
- DCHECK(base::IsValidGUID(user_id));
-}
-
-Identity::Identity(const Identity& other) = default;
-
-Identity::~Identity() {}
-
-bool Identity::operator<(const Identity& other) const {
- if (name_ != other.name_)
- return name_ < other.name_;
- if (instance_ != other.instance_)
- return instance_ < other.instance_;
- return user_id_ < other.user_id_;
-}
-
-bool Identity::operator==(const Identity& other) const {
- return other.name_ == name_ && other.instance_ == instance_ &&
- other.user_id_ == user_id_;
-}
-
-bool Identity::IsValid() const {
- return !name_.empty() && base::IsValidGUID(user_id_);
-}
-
-} // namespace service_manager

Powered by Google App Engine
This is Rietveld 408576698