Chromium Code Reviews| Index: extensions/common/host_id.h |
| diff --git a/extensions/common/host_id.h b/extensions/common/host_id.h |
| index 004480704f07766662006c7c3c570883c7e9a296..f311612eea1ab9a376bd39ae6abd1d09946a7b6d 100644 |
| --- a/extensions/common/host_id.h |
| +++ b/extensions/common/host_id.h |
| @@ -13,16 +13,11 @@ struct HostID { |
| enum HostType { EXTENSIONS, WEBUI }; |
| HostID() {} |
|
Devlin
2015/02/13 19:29:58
nit: May as well give a destructor, too.
|
| - HostID(HostType type, const std::string& id) |
| - : type_(type), id_(id) {} |
| - |
| - bool operator<(const HostID& host_id) const { |
| - if (type_ != host_id.type()) |
| - return type_ < host_id.type(); |
| - else if (id_ != host_id.id()) |
| - return id_ < host_id.id(); |
| - return false; |
| - } |
| + HostID(HostType type, const std::string& id); |
| + HostID(const HostID& host_id); |
| + |
| + bool operator<(const HostID& host_id) const; |
| + bool operator==(const HostID& host_id) const; |
| HostType type() const { return type_; } |
| const std::string& id() const { return id_; } |