OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/offline_pages/offline_page_item.h" | 5 #include "components/offline_pages/core/offline_page_item.h" |
6 | 6 |
7 namespace offline_pages { | 7 namespace offline_pages { |
8 | 8 |
9 ClientId::ClientId() : name_space(""), id("") {} | 9 ClientId::ClientId() : name_space(""), id("") {} |
10 | 10 |
11 ClientId::ClientId(std::string name_space, std::string id) | 11 ClientId::ClientId(std::string name_space, std::string id) |
12 : name_space(name_space), id(id) {} | 12 : name_space(name_space), id(id) {} |
13 | 13 |
14 bool ClientId::operator==(const ClientId& client_id) const { | 14 bool ClientId::operator==(const ClientId& client_id) const { |
15 return name_space == client_id.name_space && id == client_id.id; | 15 return name_space == client_id.name_space && id == client_id.id; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 client_id(client_id), | 49 client_id(client_id), |
50 file_path(file_path), | 50 file_path(file_path), |
51 file_size(file_size), | 51 file_size(file_size), |
52 creation_time(creation_time), | 52 creation_time(creation_time), |
53 last_access_time(creation_time), | 53 last_access_time(creation_time), |
54 access_count(0), | 54 access_count(0), |
55 flags(NO_FLAG) {} | 55 flags(NO_FLAG) {} |
56 | 56 |
57 OfflinePageItem::OfflinePageItem(const OfflinePageItem& other) = default; | 57 OfflinePageItem::OfflinePageItem(const OfflinePageItem& other) = default; |
58 | 58 |
59 OfflinePageItem::~OfflinePageItem() { | 59 OfflinePageItem::~OfflinePageItem() {} |
60 } | |
61 | 60 |
62 bool OfflinePageItem::operator==(const OfflinePageItem& other) const { | 61 bool OfflinePageItem::operator==(const OfflinePageItem& other) const { |
63 return url == other.url && | 62 return url == other.url && offline_id == other.offline_id && |
64 offline_id == other.offline_id && | 63 client_id == other.client_id && file_path == other.file_path && |
65 client_id == other.client_id && | |
66 file_path == other.file_path && | |
67 creation_time == other.creation_time && | 64 creation_time == other.creation_time && |
68 last_access_time == other.last_access_time && | 65 last_access_time == other.last_access_time && |
69 access_count == other.access_count && | 66 access_count == other.access_count && |
70 title == other.title && | 67 title == other.title && |
71 flags == other.flags && | 68 flags == other.flags && |
72 original_url == other.original_url; | 69 original_url == other.original_url; |
73 } | 70 } |
74 | 71 |
75 } // namespace offline_pages | 72 } // namespace offline_pages |
OLD | NEW |