Revert of PaymentApp: Introduce PaymentAppDatabase class. (patchset #3 id:100001 of https://codereview.chromium.org/2560293002/ )
Reason for revert:
Broke content_unittests:
[ RUN ] PaymentAppManagerTest.SetAndGetManifest
[libprotobuf ERROR c:\b\c\b\win\src\third_party\protobuf\src\google\protobuf\message_lite.cc:120] Can't parse message of type "content.PaymentAppManifestProto" because it is missing required fields: (cannot determine missing fields for lite message)
c:\b\c\b\win\src\content\browser\payments\payment_app_manager_unittest.cc(145): error: Value of: payments::mojom::PaymentAppManifestError::NONE
Actual: PaymentAppManifestError::NONE
Expected: read_error
Which is: PaymentAppManifestError::MANIFEST_STORAGE_OPERATION_FAILED
[ FAILED ] PaymentAppManagerTest.SetAndGetManifest (3 ms)
Original issue's description:
> PaymentApp: Introduce PaymentAppDatabase class.
>
> The class is providing APIs to read/write payment app related data(e.g. manifest
> and associated service worker). It can be shared between payment_app_manager.cc
> and payment_app_context.cc.
>
> The payment_app_manager.cc contains a actual implementation of the
> PaymentAppManager interface[1] used on the page or worker.
> Also, the payment_app_context.cc can be used to query all manifests data[2]
> in order to update payment request UI in Chrome layer.
>
> We can summarize this CL as follows.
> 1. Rename PaymentAppContext in content/browser/payments to
> PaymentAppContextImpl and then add PaymentAppContext interface in
> content/public to expose some APIs to Chrome layer.
> 2. Write PaymentAppDatabase class and then move most of logics to access
> database from PaymentAppManager to the new class.
> 3. Add a interface to query all manifests data in Chrome layer but it's not
> implemented yet in this CL. It will be implemented in follow-up CL[2].
>
> [1] https://w3c.github.io/webpayments-payment-apps-api/#payment-app-manager
> [2] https://codereview.chromium.org/2556433002
>
> BUG=661608
> TEST=existing unittests
>
> Review-Url: https://codereview.chromium.org/2560293002
[email protected],[email protected],[email protected],[email protected]
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=661608
Review-Url: https://codereview.chromium.org/2565423002
Cr-Commit-Position: refs/heads/master@{#437861}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 7e20f95..5516a44 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -956,10 +956,8 @@
"notifications/platform_notification_context_impl.h",
"notifications/type_converters.cc",
"notifications/type_converters.h",
- "payments/payment_app_context_impl.cc",
- "payments/payment_app_context_impl.h",
- "payments/payment_app_database.cc",
- "payments/payment_app_database.h",
+ "payments/payment_app_context.cc",
+ "payments/payment_app_context.h",
"payments/payment_app_manager.cc",
"payments/payment_app_manager.h",
"permissions/permission_service_context.cc",