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

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

Issue 1993953002: [Offline pages] Adding expiration capability to OfflinePageModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/offline_pages/offline_page_item.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_ 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 const ClientId& client_id, 48 const ClientId& client_id,
49 const base::FilePath& file_path, 49 const base::FilePath& file_path,
50 int64_t file_size, 50 int64_t file_size,
51 const base::Time& creation_time); 51 const base::Time& creation_time);
52 OfflinePageItem(const OfflinePageItem& other); 52 OfflinePageItem(const OfflinePageItem& other);
53 ~OfflinePageItem(); 53 ~OfflinePageItem();
54 54
55 // Gets a URL of the file under |file_path|. 55 // Gets a URL of the file under |file_path|.
56 GURL GetOfflineURL() const; 56 GURL GetOfflineURL() const;
57 57
58 // Returns whether the offline page is expired.
59 bool IsExpired() const;
60
58 // The URL of the page. 61 // The URL of the page.
59 GURL url; 62 GURL url;
60 // The primary key/ID for this page in offline pages internal database. 63 // The primary key/ID for this page in offline pages internal database.
61 int64_t offline_id; 64 int64_t offline_id;
62 65
63 // The Client ID (external) related to the offline page. This is opaque 66 // The Client ID (external) related to the offline page. This is opaque
64 // to our system, but useful for users of offline pages who want to map 67 // to our system, but useful for users of offline pages who want to map
65 // their ids to our saved pages. 68 // their ids to our saved pages.
66 ClientId client_id; 69 ClientId client_id;
67 70
68 // Version of the offline page item. 71 // Version of the offline page item.
69 int version; 72 int version;
70 // The file path to the archive with a local copy of the page. 73 // The file path to the archive with a local copy of the page.
71 base::FilePath file_path; 74 base::FilePath file_path;
72 // The size of the offline copy. 75 // The size of the offline copy.
73 int64_t file_size; 76 int64_t file_size;
74 // The time when the offline archive was created. 77 // The time when the offline archive was created.
75 base::Time creation_time; 78 base::Time creation_time;
76 // The time when the offline archive was last accessed. 79 // The time when the offline archive was last accessed.
77 base::Time last_access_time; 80 base::Time last_access_time;
81 // The time when the offline page was expired.
82 base::Time expiration_time;
78 // Number of times that the offline archive has been accessed. 83 // Number of times that the offline archive has been accessed.
79 int access_count; 84 int access_count;
80 // Flags about the state and behavior of the offline page. 85 // Flags about the state and behavior of the offline page.
81 Flags flags; 86 Flags flags;
82 }; 87 };
83 88
84 } // namespace offline_pages 89 } // namespace offline_pages
85 90
86 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_ 91 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_
OLDNEW
« no previous file with comments | « no previous file | components/offline_pages/offline_page_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698