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

Unified Diff: components/offline_pages/offline_page_metadata_store_impl.h

Issue 1694863003: Refactor the offline page storage to include client namespace and id. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move id generation to C++, add DB migration Created 4 years, 10 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_metadata_store_impl.h
diff --git a/components/offline_pages/offline_page_metadata_store_impl.h b/components/offline_pages/offline_page_metadata_store_impl.h
index f5476f793aad5b5520284cabdd3a761a69233d7b..f2115ee15bce4f10860186c7e6232def7744f58e 100644
--- a/components/offline_pages/offline_page_metadata_store_impl.h
+++ b/components/offline_pages/offline_page_metadata_store_impl.h
@@ -41,7 +41,7 @@ class OfflinePageMetadataStoreImpl : public OfflinePageMetadataStore {
void Load(const LoadCallback& callback) override;
void AddOrUpdateOfflinePage(const OfflinePageItem& offline_page_record,
const UpdateCallback& callback) override;
- void RemoveOfflinePages(const std::vector<int64_t>& bookmark_ids,
+ void RemoveOfflinePages(const std::vector<int64_t>& offline_ids,
const UpdateCallback& callback) override;
void Reset(const ResetCallback& callback) override;
@@ -65,6 +65,14 @@ class OfflinePageMetadataStoreImpl : public OfflinePageMetadataStore {
void ResetDone(const ResetCallback& callback, bool success);
+ // Called when a database has to be migrated from old bookmark ids
+ // to new offline ids.
+ // TODO: Remove this eventually.
+ void DatabaseUpdateDone(const OfflinePageMetadataStore::LoadCallback& cb,
+ LoadStatus status,
+ const std::vector<OfflinePageItem>& result,
+ bool success);
+
scoped_refptr<base::SequencedTaskRunner> background_task_runner_;
base::FilePath database_dir_;
scoped_ptr<leveldb_proto::ProtoDatabase<OfflinePageEntry>> database_;

Powered by Google App Engine
This is Rietveld 408576698