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

Unified Diff: components/offline_pages/offline_page_metadata_store_sql.h

Issue 2336773002: [Offline pages] Removing static sync methods from Metadata SQL store's interface (Closed)
Patch Set: Created 4 years, 3 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_metadata_store_sql.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/offline_page_metadata_store_sql.h
diff --git a/components/offline_pages/offline_page_metadata_store_sql.h b/components/offline_pages/offline_page_metadata_store_sql.h
index d5e2a0c0eb308835abe10c6a1e126aed4729ee13..c3c50f2adaa057218792e4cbb93410bbebb027ae 100644
--- a/components/offline_pages/offline_page_metadata_store_sql.h
+++ b/components/offline_pages/offline_page_metadata_store_sql.h
@@ -43,21 +43,6 @@ class OfflinePageMetadataStoreSQL : public OfflinePageMetadataStore {
StoreState state() const override;
private:
- // Synchronous implementations, these are run on the background thread
- // and actually do the work to access SQL. The implementations above
- // simply dispatch to the corresponding *Sync method on the background thread.
- // 'runner' is where to run the callback.
- static void AddOrUpdateOfflinePageSync(
- const OfflinePageItem& offline_page,
- sql::Connection* db,
- scoped_refptr<base::SingleThreadTaskRunner> runner,
- const UpdateCallback& callback);
- static void RemoveOfflinePagesSync(
- const std::vector<int64_t>& offline_ids,
- sql::Connection* db,
- scoped_refptr<base::SingleThreadTaskRunner> runner,
- const UpdateCallback& callback);
-
// Used to initialize DB connection.
void OpenConnection();
void OnOpenConnectionDone(StoreState state);
@@ -75,9 +60,13 @@ class OfflinePageMetadataStoreSQL : public OfflinePageMetadataStore {
// Path to the database on disk.
base::FilePath db_file_path_;
+
+ // Database connection.
std::unique_ptr<sql::Connection> db_;
+ // State of the store.
StoreState state_;
+
base::WeakPtrFactory<OfflinePageMetadataStoreSQL> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(OfflinePageMetadataStoreSQL);
« no previous file with comments | « no previous file | components/offline_pages/offline_page_metadata_store_sql.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698