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

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

Issue 1307753002: [Offline pages] Adding capability to free up space used by Offline pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Attempt 2 at the arm64 build issue Created 5 years, 3 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
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_MODEL_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 const DeletePageCallback& callback); 118 const DeletePageCallback& callback);
119 119
120 // Deletes offline pages related to the passed |bookmark_ids|. Requires that 120 // Deletes offline pages related to the passed |bookmark_ids|. Requires that
121 // the model is loaded. 121 // the model is loaded.
122 void DeletePagesByBookmarkId(const std::vector<int64>& bookmark_ids, 122 void DeletePagesByBookmarkId(const std::vector<int64>& bookmark_ids,
123 const DeletePageCallback& callback); 123 const DeletePageCallback& callback);
124 124
125 // Gets all available offline pages. Requires that the model is loaded. 125 // Gets all available offline pages. Requires that the model is loaded.
126 const std::vector<OfflinePageItem> GetAllPages() const; 126 const std::vector<OfflinePageItem> GetAllPages() const;
127 127
128 // Gets pages that should be removed to clean up storage. Requires that the
129 // model is loaded.
130 const std::vector<OfflinePageItem> GetPagesToCleanUp() const;
131
128 // Gets an offline page associated with a specified |bookmark_id|. Returns 132 // Gets an offline page associated with a specified |bookmark_id|. Returns
129 // true if a matching offline page exists, and |offline_page| will be updated 133 // true if a matching offline page exists, and |offline_page| will be updated
130 // with corresponding value, or false, if no offline page was found. 134 // with corresponding value, or false, if no offline page was found.
131 bool GetPageByBookmarkId(int64 bookmark_id, 135 bool GetPageByBookmarkId(int64 bookmark_id,
132 OfflinePageItem* offline_page) const; 136 OfflinePageItem* offline_page) const;
133 137
134 // Returns an offline page that is stored as |offline_url|. nullptr is 138 // Returns an offline page that is stored as |offline_url|. nullptr is
135 // returned if not found. 139 // returned if not found.
136 const OfflinePageItem* GetPageByOfflineURL(const GURL& offline_url) const; 140 const OfflinePageItem* GetPageByOfflineURL(const GURL& offline_url) const;
137 141
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 PendingArchivers pending_archivers_; 194 PendingArchivers pending_archivers_;
191 195
192 base::WeakPtrFactory<OfflinePageModel> weak_ptr_factory_; 196 base::WeakPtrFactory<OfflinePageModel> weak_ptr_factory_;
193 197
194 DISALLOW_COPY_AND_ASSIGN(OfflinePageModel); 198 DISALLOW_COPY_AND_ASSIGN(OfflinePageModel);
195 }; 199 };
196 200
197 } // namespace offline_pages 201 } // namespace offline_pages
198 202
199 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ 203 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698