| 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 #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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // Returns whether the offline page is expired. |
| 60 bool IsExpired() const; | 60 bool IsExpired() const; |
| 61 | 61 |
| 62 // The URL of the page. | 62 // The URL of the page. This is the last committed URL. In the case that |
| 63 // redirects occur, access |original_url| for the original URL. |
| 63 GURL url; | 64 GURL url; |
| 64 // The primary key/ID for this page in offline pages internal database. | 65 // The primary key/ID for this page in offline pages internal database. |
| 65 int64_t offline_id; | 66 int64_t offline_id; |
| 66 | 67 |
| 67 // The Client ID (external) related to the offline page. This is opaque | 68 // The Client ID (external) related to the offline page. This is opaque |
| 68 // to our system, but useful for users of offline pages who want to map | 69 // to our system, but useful for users of offline pages who want to map |
| 69 // their ids to our saved pages. | 70 // their ids to our saved pages. |
| 70 ClientId client_id; | 71 ClientId client_id; |
| 71 | 72 |
| 72 // 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. |
| 73 base::FilePath file_path; | 74 base::FilePath file_path; |
| 74 // The size of the offline copy. | 75 // The size of the offline copy. |
| 75 int64_t file_size; | 76 int64_t file_size; |
| 76 // The time when the offline archive was created. | 77 // The time when the offline archive was created. |
| 77 base::Time creation_time; | 78 base::Time creation_time; |
| 78 // The time when the offline archive was last accessed. | 79 // The time when the offline archive was last accessed. |
| 79 base::Time last_access_time; | 80 base::Time last_access_time; |
| 80 // The time when the offline page was expired. | 81 // The time when the offline page was expired. |
| 81 base::Time expiration_time; | 82 base::Time expiration_time; |
| 82 // Number of times that the offline archive has been accessed. | 83 // Number of times that the offline archive has been accessed. |
| 83 int access_count; | 84 int access_count; |
| 84 // The title of the page at the time it was saved. | 85 // The title of the page at the time it was saved. |
| 85 base::string16 title; | 86 base::string16 title; |
| 86 // Flags about the state and behavior of the offline page. | 87 // Flags about the state and behavior of the offline page. |
| 87 Flags flags; | 88 Flags flags; |
| 89 // The original URL of the page if not empty. Otherwise, this is set to empty |
| 90 // and |url| should be accessed instead. |
| 91 GURL original_url; |
| 88 }; | 92 }; |
| 89 | 93 |
| 90 } // namespace offline_pages | 94 } // namespace offline_pages |
| 91 | 95 |
| 92 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_ | 96 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_ |
| OLD | NEW |