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

Unified Diff: content/browser/payments/payment_app_database.h

Issue 2556433002: PaymentApp: Implement GetAllManifests() in PaymentAppContext. (Closed)
Patch Set: addressed comments Created 4 years 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: content/browser/payments/payment_app_database.h
diff --git a/content/browser/payments/payment_app_database.h b/content/browser/payments/payment_app_database.h
index d27b7d838914bcd1999c0e681d38986f6ed810fe..faeab1f725b6e85f79397f88410156a134fb0ecb 100644
--- a/content/browser/payments/payment_app_database.h
+++ b/content/browser/payments/payment_app_database.h
@@ -28,6 +28,10 @@ class CONTENT_EXPORT PaymentAppDatabase {
using ReadManifestCallback =
base::Callback<void(payments::mojom::PaymentAppManifestPtr,
payments::mojom::PaymentAppManifestError)>;
+ using ManifestWithID =
+ std::pair<int64_t, payments::mojom::PaymentAppManifestPtr>;
+ using Manifests = std::vector<ManifestWithID>;
+ using ReadAllManifestsCallback = base::Callback<void(Manifests)>;
explicit PaymentAppDatabase(
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context);
@@ -37,6 +41,7 @@ class CONTENT_EXPORT PaymentAppDatabase {
payments::mojom::PaymentAppManifestPtr manifest,
const WriteManifestCallback& callback);
void ReadManifest(const GURL& scope, const ReadManifestCallback& callback);
+ void ReadAllManifests(const ReadAllManifestsCallback& callback);
private:
// WriteManifest callbacks
@@ -57,6 +62,12 @@ class CONTENT_EXPORT PaymentAppDatabase {
const std::vector<std::string>& data,
ServiceWorkerStatusCode status);
+ // ReadAllManifests callbacks
+ void DidReadAllManifests(
+ const ReadAllManifestsCallback& callback,
+ const std::vector<std::pair<int64_t, std::string>>& raw_data,
+ ServiceWorkerStatusCode status);
+
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
base::WeakPtrFactory<PaymentAppDatabase> weak_ptr_factory_;
« no previous file with comments | « content/browser/payments/payment_app_context_impl_unittest.cc ('k') | content/browser/payments/payment_app_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698