Chromium Code Reviews| 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/offline_page_item.h" |
| 6 | 6 |
| 7 #include "net/base/filename_util.h" | 7 #include "net/base/filename_util.h" |
| 8 | 8 |
| 9 namespace offline_pages { | 9 namespace offline_pages { |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 creation_time(creation_time), | 54 creation_time(creation_time), |
| 55 last_access_time(creation_time), | 55 last_access_time(creation_time), |
| 56 access_count(0), | 56 access_count(0), |
| 57 flags(NO_FLAG) {} | 57 flags(NO_FLAG) {} |
| 58 | 58 |
| 59 OfflinePageItem::OfflinePageItem(const OfflinePageItem& other) = default; | 59 OfflinePageItem::OfflinePageItem(const OfflinePageItem& other) = default; |
| 60 | 60 |
| 61 OfflinePageItem::~OfflinePageItem() { | 61 OfflinePageItem::~OfflinePageItem() { |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool OfflinePageItem::operator==(const OfflinePageItem& other) const { | |
| 65 return url == other.url && offline_id == other.offline_id && | |
|
Dmitry Titov
2016/09/20 20:43:37
It'd be more human-readable if it was just a singl
fgorski
2016/09/20 22:15:02
Done. The problem is caused by "git cl format" and
| |
| 66 client_id == other.client_id && file_path == other.file_path && | |
| 67 creation_time == other.creation_time && | |
| 68 last_access_time == other.last_access_time && | |
| 69 expiration_time == other.expiration_time && | |
| 70 access_count == other.access_count && title == other.title && | |
| 71 flags == other.flags; | |
| 72 } | |
| 73 | |
| 64 GURL OfflinePageItem::GetOfflineURL() const { | 74 GURL OfflinePageItem::GetOfflineURL() const { |
| 65 return net::FilePathToFileURL(file_path); | 75 return net::FilePathToFileURL(file_path); |
| 66 } | 76 } |
| 67 | 77 |
| 68 bool OfflinePageItem::IsExpired() const { | 78 bool OfflinePageItem::IsExpired() const { |
| 69 return creation_time < expiration_time; | 79 return creation_time < expiration_time; |
| 70 } | 80 } |
| 71 | 81 |
| 72 } // namespace offline_pages | 82 } // namespace offline_pages |
| OLD | NEW |