Chromium Code Reviews| Index: services/resource_coordinator/public/cpp/coordination_unit_id.h |
| diff --git a/services/resource_coordinator/public/cpp/coordination_unit_id.h b/services/resource_coordinator/public/cpp/coordination_unit_id.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..69327aff148c7c3eec6a1e198e4c12681023e3ae |
| --- /dev/null |
| +++ b/services/resource_coordinator/public/cpp/coordination_unit_id.h |
| @@ -0,0 +1,27 @@ |
| +// Copyright 2017 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 SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_ID_H_ |
| +#define SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_ID_H_ |
| + |
| +#include <string> |
| + |
| +#include "services/resource_coordinator/public/cpp/coordination_unit_types.h" |
| + |
| +namespace resource_coordinator { |
| + |
| +struct CoordinationUnitID { |
| + CoordinationUnitID(); |
| + CoordinationUnitID(const CoordinationUnitType& type, const std::string& id); |
| + |
| + bool operator==(const CoordinationUnitID& b) const { |
| + return id == b.id && type == b.type; |
| + } |
| + |
| + int32_t id; |
|
Primiano Tucci (use gerrit)
2017/04/06 18:09:47
should these be immutable (+const both)?
oystein (OOO til 10th of July)
2017/04/10 20:03:00
That doesn't seem to play well with the Mojo seria
|
| + CoordinationUnitType type; |
| +}; |
| + |
| +} // resource_coordinator |
| + |
| +#endif // SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_ID_H_ |