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

Unified Diff: components/offline_pages/offline_page_model_impl.h

Issue 2415473003: Query API: Introduces an OfflinePageModelQuery object. (Closed)
Patch Set: Address comments, add more tests, rename enum. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/offline_pages/offline_page_model_impl.h
diff --git a/components/offline_pages/offline_page_model_impl.h b/components/offline_pages/offline_page_model_impl.h
index 85c58e6466a3b451a10ebd095bdeaf129ebc545b..67b82078c9013b4b1d797ff2450ca66a07006a2b 100644
--- a/components/offline_pages/offline_page_model_impl.h
+++ b/components/offline_pages/offline_page_model_impl.h
@@ -127,12 +127,12 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
typedef ScopedVector<OfflinePageArchiver> PendingArchivers;
+ void ExecuteQuery(std::unique_ptr<OfflinePageModelQuery> query,
+ const MultipleOfflinePageItemCallback& callback);
+
// Callback for ensuring archive directory is created.
void OnEnsureArchivesDirCreatedDone(const base::TimeTicks& start_time);
- void GetAllPagesAfterLoadDone(
- GetAllPageMode mode,
- const MultipleOfflinePageItemCallback& callback) const;
void CheckPagesExistOfflineAfterLoadDone(
const std::set<GURL>& urls,
const CheckPagesExistOfflineCallback& callback);
@@ -144,7 +144,6 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
const SingleOfflinePageItemCallback& callback) const;
const std::vector<int64_t> MaybeGetOfflineIdsForClientId(
const ClientId& client_id) const;
- const OfflinePageItem* MaybeGetPageByOfflineId(int64_t offline_id) const;
void GetPagesByOnlineURLWhenLoadDone(
const GURL& online_url,
const MultipleOfflinePageItemCallback& callback) const;
@@ -221,8 +220,8 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
const DeletePageCallback& callback);
// Actually does the work of deleting, requires the model is loaded.
- void DoDeletePagesByClientIds(const std::vector<ClientId>& client_ids,
- const DeletePageCallback& callback);
+ void DeletePages(const DeletePageCallback& callback,
+ const MultipleOfflinePageItemResult& items);
void DoGetPagesByClientIds(const std::vector<ClientId>& client_ids,
const MultipleOfflinePageItemCallback& callback);

Powered by Google App Engine
This is Rietveld 408576698