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

Unified Diff: components/offline_pages/offline_page_model_impl.h

Issue 2429943002: Remove all synchronous methods from OfflinePageBridge. (Closed)
Patch Set: Fix a test and address nits. 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
« no previous file with comments | « components/offline_pages/offline_page_model.h ('k') | components/offline_pages/offline_page_model_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a805f1bab2da965fc9696805fda32be9339feaa9..85c58e6466a3b451a10ebd095bdeaf129ebc545b 100644
--- a/components/offline_pages/offline_page_model_impl.h
+++ b/components/offline_pages/offline_page_model_impl.h
@@ -73,6 +73,12 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
void MarkPageAccessed(int64_t offline_id) override;
void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids,
const DeletePageCallback& callback) override;
+ void DeletePagesByClientIds(const std::vector<ClientId>& client_ids,
+ const DeletePageCallback& callback) override;
+ void GetPagesByClientIds(
+ const std::vector<ClientId>& client_ids,
+ const MultipleOfflinePageItemCallback& callback) override;
+
void DeleteCachedPagesByURLPredicate(
const UrlPredicate& predicate,
const DeletePageCallback& callback) override;
@@ -85,18 +91,12 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
void GetOfflineIdsForClientId(
const ClientId& client_id,
const MultipleOfflineIdCallback& callback) override;
- const std::vector<int64_t> MaybeGetOfflineIdsForClientId(
- const ClientId& client_id) const override;
void GetPageByOfflineId(
int64_t offline_id,
const SingleOfflinePageItemCallback& callback) override;
- const OfflinePageItem* MaybeGetPageByOfflineId(
- int64_t offline_id) const override;
void GetPagesByOnlineURL(
const GURL& online_url,
const MultipleOfflinePageItemCallback& callback) override;
- const OfflinePageItem* MaybeGetBestPageForOnlineURL(
- const GURL& online_url) const override;
void ExpirePages(const std::vector<int64_t>& offline_ids,
const base::Time& expiration_time,
const base::Callback<void(bool)>& callback) override;
@@ -142,6 +142,9 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
void GetPageByOfflineIdWhenLoadDone(
int64_t offline_id,
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;
@@ -217,6 +220,13 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
void DoDeletePagesByOfflineId(const std::vector<int64_t>& offline_ids,
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 DoGetPagesByClientIds(const std::vector<ClientId>& client_ids,
+ const MultipleOfflinePageItemCallback& callback);
+
// Similar to DoDeletePagesByOfflineId, does actual work of deleting, and
// requires that the model is loaded.
void DoDeleteCachedPagesByURLPredicate(const UrlPredicate& predicate,
« no previous file with comments | « components/offline_pages/offline_page_model.h ('k') | components/offline_pages/offline_page_model_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698