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

Unified Diff: mojo/shell/public/cpp/lib/capabilities.cc

Issue 1821383002: Moves manifest parsing to a new class, Reader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@60catref
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
« no previous file with comments | « mojo/shell/public/cpp/capabilities.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/lib/capabilities.cc
diff --git a/mojo/shell/public/cpp/lib/capabilities.cc b/mojo/shell/public/cpp/lib/capabilities.cc
index cc3fc1801941e4247f72af77f56bbacd268a16b7..add91505cbcf9d21056c8c8cfceddb71d96583e6 100644
--- a/mojo/shell/public/cpp/lib/capabilities.cc
+++ b/mojo/shell/public/cpp/lib/capabilities.cc
@@ -13,6 +13,11 @@ bool CapabilityRequest::operator==(const CapabilityRequest& other) const {
return other.classes == classes && other.interfaces == interfaces;
}
+bool CapabilityRequest::operator<(const CapabilityRequest& other) const {
+ return std::tie(classes, interfaces) <
+ std::tie(other.classes, other.interfaces);
+}
+
CapabilitySpec::CapabilitySpec() {}
CapabilitySpec::~CapabilitySpec() {}
@@ -20,6 +25,11 @@ bool CapabilitySpec::operator==(const CapabilitySpec& other) const {
return other.provided == provided && other.required == required;
}
+bool CapabilitySpec::operator<(const CapabilitySpec& other) const {
+ return std::tie(provided, required) <
+ std::tie(other.provided, other.required);
+}
+
// static
shell::mojom::CapabilitySpecPtr
TypeConverter<shell::mojom::CapabilitySpecPtr, CapabilitySpec>::Convert(
« no previous file with comments | « mojo/shell/public/cpp/capabilities.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698