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

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

Issue 1739503002: Makes the OfflinePageBridge.getAllPages method asynchronous. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // accessed. Its access info, including last access time and access count, 158 // accessed. Its access info, including last access time and access count,
159 // will be updated. Requires that the model is loaded. 159 // will be updated. Requires that the model is loaded.
160 void MarkPageAccessed(int64_t bookmark_id); 160 void MarkPageAccessed(int64_t bookmark_id);
161 161
162 // Marks that the offline page related to the passed |bookmark_id| was going 162 // Marks that the offline page related to the passed |bookmark_id| was going
163 // to be deleted. The deletion will occur in a short while. The undo can be 163 // to be deleted. The deletion will occur in a short while. The undo can be
164 // done before this. Requires that the model is loaded. 164 // done before this. Requires that the model is loaded.
165 void MarkPageForDeletion(int64_t bookmark_id, 165 void MarkPageForDeletion(int64_t bookmark_id,
166 const DeletePageCallback& callback); 166 const DeletePageCallback& callback);
167 167
168 // Deletes an offline page related to the passed |bookmark_id|. Requires that
169 // the model is loaded.
170 void DeletePageByBookmarkId(int64_t bookmark_id,
171 const DeletePageCallback& callback);
172
173 // Deletes offline pages related to the passed |bookmark_ids|. Requires that 168 // Deletes offline pages related to the passed |bookmark_ids|. Requires that
174 // the model is loaded. 169 // the model is loaded.
175 void DeletePagesByBookmarkId(const std::vector<int64_t>& bookmark_ids, 170 void DeletePagesByBookmarkId(const std::vector<int64_t>& bookmark_ids,
176 const DeletePageCallback& callback); 171 const DeletePageCallback& callback);
177 172
178 // Wipes out all the data by deleting all saved files and clearing the store. 173 // Wipes out all the data by deleting all saved files and clearing the store.
179 void ClearAll(const base::Closure& callback); 174 void ClearAll(const base::Closure& callback);
180 175
181 // Returns true if there're offline pages. 176 // Returns true if there're offline pages.
182 bool HasOfflinePages() const; 177 bool HasOfflinePages() const;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 scoped_observer_; 317 scoped_observer_;
323 318
324 base::WeakPtrFactory<OfflinePageModel> weak_ptr_factory_; 319 base::WeakPtrFactory<OfflinePageModel> weak_ptr_factory_;
325 320
326 DISALLOW_COPY_AND_ASSIGN(OfflinePageModel); 321 DISALLOW_COPY_AND_ASSIGN(OfflinePageModel);
327 }; 322 };
328 323
329 } // namespace offline_pages 324 } // namespace offline_pages
330 325
331 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ 326 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698