Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: components/offline_pages/offline_page_item.cc

Issue 2343743002: [Offline pages] Updating the UpdateCallback in OPMStoreSQL (Closed)
Patch Set: Addressing final feedback Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 &&
66 offline_id == other.offline_id &&
67 client_id == other.client_id &&
68 file_path == other.file_path &&
69 creation_time == other.creation_time &&
70 last_access_time == other.last_access_time &&
71 expiration_time == other.expiration_time &&
72 access_count == other.access_count &&
73 title == other.title &&
74 flags == other.flags;
75 }
76
64 GURL OfflinePageItem::GetOfflineURL() const { 77 GURL OfflinePageItem::GetOfflineURL() const {
65 return net::FilePathToFileURL(file_path); 78 return net::FilePathToFileURL(file_path);
66 } 79 }
67 80
68 bool OfflinePageItem::IsExpired() const { 81 bool OfflinePageItem::IsExpired() const {
69 return creation_time < expiration_time; 82 return creation_time < expiration_time;
70 } 83 }
71 84
72 } // namespace offline_pages 85 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698