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

Issue 2560293002: PaymentApp: Introduce PaymentAppDatabase class. (Closed)

Created:
4 years ago by zino
Modified:
4 years ago
CC:
chromium-reviews, jam, wjmaclean, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

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 Committed: https://crrev.com/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1 Cr-Commit-Position: refs/heads/master@{#437855}

Patch Set 1 #

Total comments: 4

Patch Set 2 : PaymentApp: Introduce PaymentAppDatabase class. #

Total comments: 3

Patch Set 3 : PaymentApp: Introduce PaymentAppDatabase class. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+330 lines, -398 lines) Patch
M content/browser/BUILD.gn View 1 chunk +4 lines, -2 lines 0 comments Download
D content/browser/payments/payment_app_context.h View 1 chunk +0 lines, -64 lines 0 comments Download
D content/browser/payments/payment_app_context.cc View 1 chunk +0 lines, -69 lines 0 comments Download
A + content/browser/payments/payment_app_context_impl.h View 3 chunks +24 lines, -13 lines 0 comments Download
A content/browser/payments/payment_app_context_impl.cc View 1 2 1 chunk +93 lines, -0 lines 0 comments Download
A content/browser/payments/payment_app_database.h View 1 2 1 chunk +68 lines, -0 lines 0 comments Download
A + content/browser/payments/payment_app_database.cc View 1 2 6 chunks +87 lines, -88 lines 0 comments Download
M content/browser/payments/payment_app_manager.h View 2 chunks +4 lines, -24 lines 0 comments Download
M content/browser/payments/payment_app_manager.cc View 1 3 chunks +8 lines, -125 lines 0 comments Download
M content/browser/payments/payment_app_manager_unittest.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/storage_partition_impl.h View 4 chunks +4 lines, -4 lines 0 comments Download
M content/browser/storage_partition_impl.cc View 3 chunks +5 lines, -4 lines 0 comments Download
A content/public/browser/payment_app_context.h View 1 2 1 chunk +29 lines, -0 lines 0 comments Download

Messages

Total messages: 54 (39 generated)
zino
PTAL + rouslan@ (and tommyt@) for content/browser/payments + Avi@ for other parts of content directory.
4 years ago (2016-12-09 20:20:26 UTC) #4
Avi (use Gerrit)
non-payment content stuff lgtm
4 years ago (2016-12-09 21:30:49 UTC) #5
please use gerrit instead
lgtm https://codereview.chromium.org/2560293002/diff/1/content/browser/payments/payment_app_database.h File content/browser/payments/payment_app_database.h (right): https://codereview.chromium.org/2560293002/diff/1/content/browser/payments/payment_app_database.h#newcode36 content/browser/payments/payment_app_database.h:36: void WriteManifest(const std::string& scope, Can we use GURL ...
4 years ago (2016-12-09 21:58:47 UTC) #6
zino
Thank you for review. https://codereview.chromium.org/2560293002/diff/1/content/browser/payments/payment_app_database.h File content/browser/payments/payment_app_database.h (right): https://codereview.chromium.org/2560293002/diff/1/content/browser/payments/payment_app_database.h#newcode36 content/browser/payments/payment_app_database.h:36: void WriteManifest(const std::string& scope, On ...
4 years ago (2016-12-09 22:30:17 UTC) #7
please use gerrit instead
https://codereview.chromium.org/2560293002/diff/20001/content/public/browser/payment_app_context.h File content/public/browser/payment_app_context.h (right): https://codereview.chromium.org/2560293002/diff/20001/content/public/browser/payment_app_context.h#newcode20 content/public/browser/payment_app_context.h:20: std::pair<int64_t, payments::mojom::PaymentAppManifestPtr>; tommyt@'s implementation of PaymentAppManifest uses scopeUrl to ...
4 years ago (2016-12-09 23:56:30 UTC) #10
zino
tommyt@, Could you please check my comment again? https://codereview.chromium.org/2560293002/diff/20001/content/public/browser/payment_app_context.h File content/public/browser/payment_app_context.h (right): https://codereview.chromium.org/2560293002/diff/20001/content/public/browser/payment_app_context.h#newcode20 content/public/browser/payment_app_context.h:20: std::pair<int64_t, ...
4 years ago (2016-12-10 00:19:58 UTC) #11
tommyt
lgtm https://codereview.chromium.org/2560293002/diff/20001/content/public/browser/payment_app_context.h File content/public/browser/payment_app_context.h (right): https://codereview.chromium.org/2560293002/diff/20001/content/public/browser/payment_app_context.h#newcode20 content/public/browser/payment_app_context.h:20: std::pair<int64_t, payments::mojom::PaymentAppManifestPtr>; On 2016/12/10 00:19:58, zino wrote: > ...
4 years ago (2016-12-10 10:04:47 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2560293002/100001
4 years ago (2016-12-11 18:28:38 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/196727)
4 years ago (2016-12-11 20:22:16 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2560293002/100001
4 years ago (2016-12-12 12:41:53 UTC) #46
commit-bot: I haz the power
Committed patchset #3 (id:100001)
4 years ago (2016-12-12 12:46:12 UTC) #49
vasilii
A revert of this CL (patchset #3 id:100001) has been created in https://codereview.chromium.org/2565423002/ by vasilii@chromium.org. ...
4 years ago (2016-12-12 13:44:51 UTC) #50
findit-for-me
FYI: Findit identified this CL at revision 437855 as the culprit for failures in the ...
4 years ago (2016-12-12 14:02:24 UTC) #51
zino
On 2016/12/12 14:02:24, findit-for-me wrote: > FYI: Findit identified this CL at revision 437855 as ...
4 years ago (2016-12-12 14:28:14 UTC) #52
commit-bot: I haz the power
4 years ago (2016-12-12 15:11:45 UTC) #54
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/3b0d3c1f7b4ab17b5abb62b6767615e5ca5a4eb1
Cr-Commit-Position: refs/heads/master@{#437855}

Powered by Google App Engine
This is Rietveld 408576698