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

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

Issue 2512073002: [Offline Pages] Removes two-step expiration related. (Closed)
Patch Set: Created 4 years, 1 month 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 #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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 int64_t offline_id, 49 int64_t offline_id,
50 const ClientId& client_id, 50 const ClientId& client_id,
51 const base::FilePath& file_path, 51 const base::FilePath& file_path,
52 int64_t file_size, 52 int64_t file_size,
53 const base::Time& creation_time); 53 const base::Time& creation_time);
54 OfflinePageItem(const OfflinePageItem& other); 54 OfflinePageItem(const OfflinePageItem& other);
55 ~OfflinePageItem(); 55 ~OfflinePageItem();
56 56
57 bool operator==(const OfflinePageItem& other) const; 57 bool operator==(const OfflinePageItem& other) const;
58 58
59 // Returns whether the offline page is expired. 59 // The URL of the page.
60 bool IsExpired() const;
61
62 // The URL of the page. This is the last committed URL. In the case that
fgorski 2016/11/18 00:13:04 don't remove valid comments.
romax 2016/11/18 20:50:48 Done.
63 // redirects occur, access |original_url| for the original URL.
64 GURL url; 60 GURL url;
65 // The primary key/ID for this page in offline pages internal database. 61 // The primary key/ID for this page in offline pages internal database.
66 int64_t offline_id; 62 int64_t offline_id;
67 63
68 // The Client ID (external) related to the offline page. This is opaque 64 // The Client ID (external) related to the offline page. This is opaque
69 // to our system, but useful for users of offline pages who want to map 65 // to our system, but useful for users of offline pages who want to map
70 // their ids to our saved pages. 66 // their ids to our saved pages.
71 ClientId client_id; 67 ClientId client_id;
72 68
73 // The file path to the archive with a local copy of the page. 69 // The file path to the archive with a local copy of the page.
74 base::FilePath file_path; 70 base::FilePath file_path;
75 // The size of the offline copy. 71 // The size of the offline copy.
76 int64_t file_size; 72 int64_t file_size;
77 // The time when the offline archive was created. 73 // The time when the offline archive was created.
78 base::Time creation_time; 74 base::Time creation_time;
79 // The time when the offline archive was last accessed. 75 // The time when the offline archive was last accessed.
80 base::Time last_access_time; 76 base::Time last_access_time;
81 // The time when the offline page was expired.
82 base::Time expiration_time;
83 // Number of times that the offline archive has been accessed. 77 // Number of times that the offline archive has been accessed.
84 int access_count; 78 int access_count;
85 // The title of the page at the time it was saved. 79 // The title of the page at the time it was saved.
86 base::string16 title; 80 base::string16 title;
87 // Flags about the state and behavior of the offline page. 81 // Flags about the state and behavior of the offline page.
88 Flags flags; 82 Flags flags;
89 // The original URL of the page if not empty. Otherwise, this is set to empty 83 // The original URL of the page if not empty. Otherwise, this is set to empty
90 // and |url| should be accessed instead. 84 // and |url| should be accessed instead.
91 GURL original_url; 85 GURL original_url;
92 }; 86 };
93 87
94 } // namespace offline_pages 88 } // namespace offline_pages
95 89
96 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_ 90 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698