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

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: Converting jlongarray to std::vector<int64> 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 const DeletePageCallback& callback); 130 const DeletePageCallback& callback);
131 131
132 // Deletes offline pages related to the passed |bookmark_ids|. Requires that 132 // Deletes offline pages related to the passed |bookmark_ids|. Requires that
133 // the model is loaded. 133 // the model is loaded.
134 void DeletePagesByBookmarkId(const std::vector<int64>& bookmark_ids, 134 void DeletePagesByBookmarkId(const std::vector<int64>& bookmark_ids,
135 const DeletePageCallback& callback); 135 const DeletePageCallback& callback);
136 136
137 // Gets all available offline pages. Requires that the model is loaded. 137 // Gets all available offline pages. Requires that the model is loaded.
138 const std::vector<OfflinePageItem> GetAllPages() const; 138 const std::vector<OfflinePageItem> GetAllPages() const;
139 139
140 // Gets pages that should be removed to clean up storage. Requires that the
141 // model is loaded.
142 const std::vector<OfflinePageItem> GetPagesToCleanUp() const;
143
140 // Gets an offline page associated with a specified |bookmark_id|. Returns 144 // Gets an offline page associated with a specified |bookmark_id|. Returns
141 // true if a matching offline page exists, and |offline_page| will be updated 145 // true if a matching offline page exists, and |offline_page| will be updated
142 // with corresponding value, or false, if no offline page was found. 146 // with corresponding value, or false, if no offline page was found.
143 bool GetPageByBookmarkId(int64 bookmark_id, 147 bool GetPageByBookmarkId(int64 bookmark_id,
144 OfflinePageItem* offline_page) const; 148 OfflinePageItem* offline_page) const;
145 149
146 // Returns an offline page that is stored as |offline_url|. nullptr is 150 // Returns an offline page that is stored as |offline_url|. nullptr is
147 // returned if not found. 151 // returned if not found.
148 const OfflinePageItem* GetPageByOfflineURL(const GURL& offline_url) const; 152 const OfflinePageItem* GetPageByOfflineURL(const GURL& offline_url) const;
149 153
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 scoped_observer_; 220 scoped_observer_;
217 221
218 base::WeakPtrFactory<OfflinePageModel> weak_ptr_factory_; 222 base::WeakPtrFactory<OfflinePageModel> weak_ptr_factory_;
219 223
220 DISALLOW_COPY_AND_ASSIGN(OfflinePageModel); 224 DISALLOW_COPY_AND_ASSIGN(OfflinePageModel);
221 }; 225 };
222 226
223 } // namespace offline_pages 227 } // namespace offline_pages
224 228
225 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ 229 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_bridge.cc ('k') | components/offline_pages/offline_page_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698