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

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

Issue 1902593006: [Offline pages] Removing undoing of deleting offline pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarks-out
Patch Set: Created 4 years, 8 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 true if the page has been marked for deletion. This allows an undo
59 // in a short time period. After that, the marked page will be deleted.
60 bool IsMarkedForDeletion() const;
61
62 // Sets/clears the mark for deletion.
63 void MarkForDeletion();
64 void ClearMarkForDeletion();
65
66 // The URL of the page. 58 // The URL of the page.
67 GURL url; 59 GURL url;
68 // The primary key/ID for this page in offline pages internal database. 60 // The primary key/ID for this page in offline pages internal database.
69 int64_t offline_id; 61 int64_t offline_id;
70 62
71 // The Client ID (external) related to the offline page. This is opaque 63 // The Client ID (external) related to the offline page. This is opaque
72 // to our system, but useful for users of offline pages who want to map 64 // to our system, but useful for users of offline pages who want to map
73 // their ids to our saved pages. 65 // their ids to our saved pages.
74 ClientId client_id; 66 ClientId client_id;
75 67
76 // Version of the offline page item. 68 // Version of the offline page item.
77 int version; 69 int version;
78 // 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.
79 base::FilePath file_path; 71 base::FilePath file_path;
80 // The size of the offline copy. 72 // The size of the offline copy.
81 int64_t file_size; 73 int64_t file_size;
82 // The time when the offline archive was created. 74 // The time when the offline archive was created.
83 base::Time creation_time; 75 base::Time creation_time;
84 // The time when the offline archive was last accessed. 76 // The time when the offline archive was last accessed.
85 base::Time last_access_time; 77 base::Time last_access_time;
86 // Number of times that the offline archive has been accessed. 78 // Number of times that the offline archive has been accessed.
87 int access_count; 79 int access_count;
88 // Flags about the state and behavior of the offline page. 80 // Flags about the state and behavior of the offline page.
89 Flags flags; 81 Flags flags;
90 }; 82 };
91 83
92 } // namespace offline_pages 84 } // namespace offline_pages
93 85
94 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_ 86 #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