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

Unified Diff: components/offline_pages/offline_page_model.h

Issue 2026843003: [Offline Pages] Removing client in storage manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Styles. Created 4 years, 7 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 | « no previous file | components/offline_pages/offline_page_model_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cfb7442478fc6c1a8fbd81ecf4f33ec5f7e36c0a..1c1ec5f324fa88660788a36dfa2aac5838b95c42 100644
--- a/components/offline_pages/offline_page_model.h
+++ b/components/offline_pages/offline_page_model.h
@@ -46,8 +46,7 @@ struct OfflinePageItem;
//
// TODO(fgorski): Things to describe:
// * how to cancel requests and what to expect
-class OfflinePageModel : public base::SupportsUserData,
- public OfflinePageStorageManager::Client {
+class OfflinePageModel : public base::SupportsUserData {
public:
// Observer of the OfflinePageModel.
class Observer {
@@ -100,13 +99,13 @@ class OfflinePageModel : public base::SupportsUserData,
// will be updated. Requires that the model is loaded.
virtual void MarkPageAccessed(int64_t offline_id) = 0;
- // TODO(romax): Pull this interface up from OfflinePageStorageManager::Client
- // void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids,
- // const DeletePageCallback& callback);
-
// Wipes out all the data by deleting all saved files and clearing the store.
virtual void ClearAll(const base::Closure& callback) = 0;
+ // Deletes pages based on |ofline_ids|.
+ virtual void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids,
+ const DeletePageCallback& callback) = 0;
+
// Deletes offline pages matching the URL predicate.
virtual void DeletePagesByURLPredicate(
const UrlPredicate& predicate,
@@ -123,6 +122,9 @@ class OfflinePageModel : public base::SupportsUserData,
const std::set<GURL>& urls,
const CheckPagesExistOfflineCallback& callback) = 0;
+ // Gets all offline pages.
+ virtual void GetAllPages(const MultipleOfflinePageItemCallback& callback) = 0;
+
// Gets all offline ids where the offline page has the matching client id.
virtual void GetOfflineIdsForClientId(
const ClientId& client_id,
@@ -186,6 +188,12 @@ class OfflinePageModel : public base::SupportsUserData,
// observers.
virtual void CheckForExternalFileDeletion() = 0;
+ // Marks pages with |offline_ids| as expired and deletes the associated
+ // archive files.
+ virtual void ExpirePages(const std::vector<int64_t>& offline_ids,
+ const base::Time& expiration_time,
+ const base::Callback<void(bool)>& callback) = 0;
+
// Returns the policy controller.
virtual ClientPolicyController* GetPolicyController() = 0;
« no previous file with comments | « no previous file | components/offline_pages/offline_page_model_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698