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

Unified Diff: components/offline_pages/offline_page_model_impl.h

Issue 2185973003: [Offline Pages] Delete associated page along with bookmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding offline_pages::ExternalListener. 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
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 b93a227ebf40a5f09029fd8ffdbd3921eae29da0..33ab33cc86d2736cc71f78b0c3d4a5f5b3f305f3 100644
--- a/components/offline_pages/offline_page_model_impl.h
+++ b/components/offline_pages/offline_page_model_impl.h
@@ -39,6 +39,10 @@ class TimeDelta;
class TimeTicks;
} // namespace base
+namespace bookmarks {
+class BookmarkNode;
+} // namespace bookmarks
+
namespace offline_pages {
static const int64_t kInvalidOfflineId = 0;
@@ -110,6 +114,7 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
void ExpirePages(const std::vector<int64_t>& offline_ids,
const base::Time& expiration_time,
const base::Callback<void(bool)>& callback) override;
+ void ExpireRemovedBookmarkPage(const bookmarks::BookmarkNode* node) override;
ClientPolicyController* GetPolicyController() override;
// Methods for testing only:
@@ -264,6 +269,10 @@ class OfflinePageModelImpl : public OfflinePageModel, public KeyedService {
// Post task to clear storage.
void PostClearStorageIfNeededTask();
+ // Expire associate pages when a bookmark gets deleted.
+ void DoExpireRemovedBookmarkPages(const std::vector<int64_t>& offline_ids);
+ void OnRemovedBookmarkPagesExpired(bool result);
+
void RunWhenLoaded(const base::Closure& job);
// Persistent store for offline page metadata.

Powered by Google App Engine
This is Rietveld 408576698