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

Unified Diff: components/offline_pages/offline_page_item.cc

Issue 1993953002: [Offline pages] Adding expiration capability to OfflinePageModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing feedback Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/offline_pages/offline_page_item.cc
diff --git a/components/offline_pages/offline_page_item.cc b/components/offline_pages/offline_page_item.cc
index 98d514473d79f7e05fdfed13647df0023ace522b..19d1de12cbd2038d40178b863bf7562e2eda5610 100644
--- a/components/offline_pages/offline_page_item.cc
+++ b/components/offline_pages/offline_page_item.cc
@@ -69,4 +69,8 @@ GURL OfflinePageItem::GetOfflineURL() const {
return net::FilePathToFileURL(file_path);
}
+bool OfflinePageItem::IsExpired() const {
romax 2016/05/20 19:05:00 seems like when you've set a value for expiration_
fgorski 2016/05/20 20:54:53 first: It is easier to compare it against creaiton
+ return creation_time < expiration_time;
+}
+
} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698