OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/offline_pages/core/client_id.h" |
| 6 |
| 7 namespace offline_pages { |
| 8 |
| 9 ClientId::ClientId() {} |
| 10 |
| 11 ClientId::ClientId(const std::string& name_space, const std::string& id) |
| 12 : name_space(name_space), id(id) {} |
| 13 |
| 14 bool ClientId::operator==(const ClientId& client_id) const { |
| 15 return name_space == client_id.name_space && id == client_id.id; |
| 16 } |
| 17 |
| 18 bool ClientId::operator<(const ClientId& client_id) const { |
| 19 if (name_space == client_id.name_space) |
| 20 return (id < client_id.id); |
| 21 |
| 22 return name_space < client_id.name_space; |
| 23 } |
| 24 |
| 25 } // namespace offline_pages |
OLD | NEW |