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

Unified Diff: components/offline_pages/offline_page_model.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
Index: components/offline_pages/offline_page_model.h
diff --git a/components/offline_pages/offline_page_model.h b/components/offline_pages/offline_page_model.h
index cf6ef7417743ca9c26152ec20549ff1e7d0e9d85..4222b53917dd5cfd5aa95916c6aea2a670b35d64 100644
--- a/components/offline_pages/offline_page_model.h
+++ b/components/offline_pages/offline_page_model.h
@@ -103,6 +103,15 @@ class OfflinePageModel : public base::SupportsUserData {
virtual void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids,
const DeletePageCallback& callback) = 0;
+ // Deletes all pages associated with any of |client_ids|.
+ virtual void DeletePagesByClientIds(const std::vector<ClientId>& client_ids,
+ const DeletePageCallback& callback) = 0;
+
+ // Retrieves all pages associated with any of |client_ids|.
+ virtual void GetPagesByClientIds(
+ const std::vector<ClientId>& client_ids,
+ const MultipleOfflinePageItemCallback& callback) = 0;
+
// Deletes cached offline pages matching the URL predicate.
virtual void DeleteCachedPagesByURLPredicate(
const UrlPredicate& predicate,
@@ -126,34 +135,16 @@ class OfflinePageModel : public base::SupportsUserData {
const ClientId& client_id,
const MultipleOfflineIdCallback& callback) = 0;
- // Gets all offline ids where the offline page has the matching client id.
- // Requires that the model is loaded. May not return matching IDs depending
- // on the internal state of the model.
- //
- // This function is deprecated. Use |GetOfflineIdsForClientId| instead.
- virtual const std::vector<int64_t> MaybeGetOfflineIdsForClientId(
- const ClientId& client_id) const = 0;
-
// Returns zero or one offline pages associated with a specified |offline_id|.
virtual void GetPageByOfflineId(
int64_t offline_id,
const SingleOfflinePageItemCallback& callback) = 0;
- // Returns an offline page associated with a specified |offline_id|. nullptr
- // is returned if not found.
- virtual const OfflinePageItem* MaybeGetPageByOfflineId(
- int64_t offline_id) const = 0;
-
// Returns the offline pages that are stored under |online_url|.
virtual void GetPagesByOnlineURL(
const GURL& online_url,
const MultipleOfflinePageItemCallback& callback) = 0;
- // Returns an offline page saved for |online_url|. A nullptr is returned if
- // not found. See |GetBestPageForOnlineURL| for selection criteria.
- virtual const OfflinePageItem* MaybeGetBestPageForOnlineURL(
- const GURL& online_url) const = 0;
-
// Marks pages with |offline_ids| as expired and deletes the associated
// archive files.
virtual void ExpirePages(const std::vector<int64_t>& offline_ids,
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_bridge.cc ('k') | components/offline_pages/offline_page_model_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698