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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 int64_t file_size); | 47 int64_t file_size); |
48 OfflinePageItem(const GURL& url, | 48 OfflinePageItem(const GURL& url, |
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 // Gets a URL of the file under |file_path|. | |
58 GURL GetOfflineURL() const; | |
59 | |
60 // Returns whether the offline page is expired. | 57 // Returns whether the offline page is expired. |
61 bool IsExpired() const; | 58 bool IsExpired() const; |
62 | 59 |
63 // The URL of the page. | 60 // The URL of the page. |
64 GURL url; | 61 GURL url; |
65 // The primary key/ID for this page in offline pages internal database. | 62 // The primary key/ID for this page in offline pages internal database. |
66 int64_t offline_id; | 63 int64_t offline_id; |
67 | 64 |
68 // The Client ID (external) related to the offline page. This is opaque | 65 // 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 | 66 // to our system, but useful for users of offline pages who want to map |
(...skipping 16 matching lines...) Expand all Loading... |
86 int access_count; | 83 int access_count; |
87 // The title of the page at the time it was saved. | 84 // The title of the page at the time it was saved. |
88 base::string16 title; | 85 base::string16 title; |
89 // Flags about the state and behavior of the offline page. | 86 // Flags about the state and behavior of the offline page. |
90 Flags flags; | 87 Flags flags; |
91 }; | 88 }; |
92 | 89 |
93 } // namespace offline_pages | 90 } // namespace offline_pages |
94 | 91 |
95 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_ | 92 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_ |
OLD | NEW |