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

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: address changes 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 f9248c65e26bdc2b80644f5117ce2edf47034187..58ee92fde5b2f6ad24455e286c4566949b920ede 100644
--- a/components/offline_pages/offline_page_metadata_store_impl.h
+++ b/components/offline_pages/offline_page_metadata_store_impl.h
@@ -25,7 +25,7 @@ namespace offline_pages {
class OfflinePageEntry;
-// Implements OfflinePageMetadataStore using leveldb_proto::Protoatabase
+// Implements OfflinePageMetadataStore using leveldb_proto::ProtoDatabase
// component. Stores metadata of offline pages as serialized protobufs in a
// LevelDB key/value pairs.
// Underlying implementation guarantees that all of the method calls will be
@@ -42,7 +42,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;
@@ -67,6 +67,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(bburns): Perhaps 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