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

Unified Diff: components/policy/core/common/policy_namespace.cc

Issue 50613003: Move the PolicyDomain and PolicyNamespace types to the policy component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/policy/core/common/policy_namespace.h ('k') | components/policy/stub_to_remove.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/policy_namespace.cc
diff --git a/components/policy/core/common/policy_namespace.cc b/components/policy/core/common/policy_namespace.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0fac9ca1e458aa076434f0e93e3795d2bd37b1ac
--- /dev/null
+++ b/components/policy/core/common/policy_namespace.cc
@@ -0,0 +1,41 @@
+// Copyright 2013 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 "components/policy/core/common/policy_namespace.h"
+
+namespace policy {
+
+PolicyNamespace::PolicyNamespace() {}
+
+PolicyNamespace::PolicyNamespace(PolicyDomain domain,
+ const std::string& component_id)
+ : domain(domain),
+ component_id(component_id) {}
+
+PolicyNamespace::PolicyNamespace(const PolicyNamespace& other)
+ : domain(other.domain),
+ component_id(other.component_id) {}
+
+PolicyNamespace::~PolicyNamespace() {}
+
+PolicyNamespace& PolicyNamespace::operator=(const PolicyNamespace& other) {
+ domain = other.domain;
+ component_id = other.component_id;
+ return *this;
+}
+
+bool PolicyNamespace::operator<(const PolicyNamespace& other) const {
+ return domain < other.domain ||
+ (domain == other.domain && component_id < other.component_id);
+}
+
+bool PolicyNamespace::operator==(const PolicyNamespace& other) const {
+ return domain == other.domain && component_id == other.component_id;
+}
+
+bool PolicyNamespace::operator!=(const PolicyNamespace& other) const {
+ return !(*this == other);
+}
+
+} // namespace policy
« no previous file with comments | « components/policy/core/common/policy_namespace.h ('k') | components/policy/stub_to_remove.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698