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

Unified Diff: components/offline_pages/offline_page_model_impl.h

Issue 2275833002: [Offline Pages] Don't remove user-requested pages when deleting cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 4 years, 4 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 06c9e43434904689f4215b6bd68c2f29464de304..566eb3df9df123104fff83025c9c00929dd8051e 100644
--- a/components/offline_pages/offline_page_model_impl.h
+++ b/components/offline_pages/offline_page_model_impl.h
@@ -75,8 +75,9 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
void ClearAll(const base::Closure& callback) override;
void DeletePagesByOfflineId(const std::vector<int64_t>& offline_ids,
const DeletePageCallback& callback) override;
- void DeletePagesByURLPredicate(const UrlPredicate& predicate,
- const DeletePageCallback& callback) override;
+ void DeleteCachedPagesByURLPredicate(
+ const UrlPredicate& predicate,
+ const DeletePageCallback& callback) override;
void HasPages(const std::string& name_space,
const HasPagesCallback& callback) override;
void CheckPagesExistOffline(
@@ -242,8 +243,8 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
// Similar to DoDeletePagesByOfflineId, does actual work of deleting, and
// requires that the model is loaded.
- void DoDeletePagesByURLPredicate(const UrlPredicate& predicate,
- const DeletePageCallback& callback);
+ void DoDeleteCachedPagesByURLPredicate(const UrlPredicate& predicate,
+ const DeletePageCallback& callback);
// Callback completing page expiration.
void OnExpirePageDone(int64_t offline_id,
@@ -261,6 +262,9 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
// Post task to clear storage.
void PostClearStorageIfNeededTask();
+ // Check if |offline_page| is user-requested.
+ bool IsUserRequestedPage(const OfflinePageItem& offline_page) const;
+
void RunWhenLoaded(const base::Closure& job);
// Persistent store for offline page metadata.
« 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