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

Unified Diff: components/offline_pages/background/request_queue_store_sql.h

Issue 2410903003: [Offline pages] Adding capability to query a subset of requests based on IDs (Closed)
Patch Set: Addressing remaining feedback Created 4 years, 2 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/background/request_queue_store_sql.h
diff --git a/components/offline_pages/background/request_queue_store_sql.h b/components/offline_pages/background/request_queue_store_sql.h
index d67d14f348be14319b20eb265341159b9cff3466..0be2eb5700e73b3a2ab7100ed6480ff13da13ec5 100644
--- a/components/offline_pages/background/request_queue_store_sql.h
+++ b/components/offline_pages/background/request_queue_store_sql.h
@@ -33,6 +33,11 @@ class RequestQueueStoreSQL : public RequestQueueStore {
// RequestQueueStore implementation.
void GetRequests(const GetRequestsCallback& callback) override;
+ // Note: current implementation of this method makes a SQL query per ID. This
+ // is OK as long as number of IDs stays low, which is a typical case.
+ // Implementation should be revisited in case that presumption changes.
+ void GetRequestsByIds(const std::vector<int64_t>& request_ids,
+ const UpdateCallback& callback) override;
void AddRequest(const SavePageRequest& offline_page,
const AddCallback& callback) override;
void UpdateRequests(const std::vector<SavePageRequest>& requests,

Powered by Google App Engine
This is Rietveld 408576698