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

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

Issue 2512073002: [Offline Pages] Removes two-step expiration related. (Closed)
Patch Set: adding unit in histograms. Created 4 years 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.
60 bool IsExpired() const;
61
62 // The URL of the page. This is the last committed URL. In the case that 59 // 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. 60 // redirects occur, access |original_url| for the original URL.
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
70 // their ids to our saved pages. 67 // their ids to our saved pages.
71 ClientId client_id; 68 ClientId client_id;
72 69
73 // The file path to the archive with a local copy of the page. 70 // The file path to the archive with a local copy of the page.
74 base::FilePath file_path; 71 base::FilePath file_path;
75 // The size of the offline copy. 72 // The size of the offline copy.
76 int64_t file_size; 73 int64_t file_size;
77 // The time when the offline archive was created. 74 // The time when the offline archive was created.
78 base::Time creation_time; 75 base::Time creation_time;
79 // The time when the offline archive was last accessed. 76 // The time when the offline archive was last accessed.
80 base::Time last_access_time; 77 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. 78 // Number of times that the offline archive has been accessed.
84 int access_count; 79 int access_count;
85 // The title of the page at the time it was saved. 80 // The title of the page at the time it was saved.
86 base::string16 title; 81 base::string16 title;
87 // Flags about the state and behavior of the offline page. 82 // Flags about the state and behavior of the offline page.
88 Flags flags; 83 Flags flags;
89 // The original URL of the page if not empty. Otherwise, this is set to empty 84 // The original URL of the page if not empty. Otherwise, this is set to empty
90 // and |url| should be accessed instead. 85 // and |url| should be accessed instead.
91 GURL original_url; 86 GURL original_url;
92 }; 87 };
93 88
94 } // namespace offline_pages 89 } // namespace offline_pages
95 90
96 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_ 91 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_
OLDNEW
« no previous file with comments | « components/offline_pages/downloads/download_ui_adapter.cc ('k') | components/offline_pages/offline_page_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698