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

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

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

Description

PaymentApp: Introduce PaymentAppDatabase class. Write PaymentAppDatabase class and then just move most of logics to access database from PaymentAppManager to the new 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. in order to update payment request UI in Chrome layer. [1] https://w3c.github.io/webpayments-payment-apps-api/#payment-app-manager BUG=661608 Committed: https://crrev.com/ab43057199ce68c2e9264fa98c9bd24cc1be4fd8 Cr-Commit-Position: refs/heads/master@{#439100}

Patch Set 1 #

Total comments: 2

Patch Set 2 : MakeUnique #

Patch Set 3 : rebase #

Patch Set 4 : rebase #

Total comments: 28

Patch Set 5 : PaymentApp: Introduce PaymentAppDatabase class. #

Total comments: 10

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+278 lines, -256 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/payments/payment_app_context_impl.h View 1 2 3 4 5 2 chunks +45 lines, -11 lines 0 comments Download
M content/browser/payments/payment_app_context_impl.cc View 1 2 3 4 5 2 chunks +47 lines, -20 lines 0 comments Download
A content/browser/payments/payment_app_database.h View 1 chunk +68 lines, -0 lines 0 comments Download
A + content/browser/payments/payment_app_database.cc View 1 2 5 chunks +30 lines, -49 lines 0 comments Download
M content/browser/payments/payment_app_manager.h View 2 chunks +0 lines, -20 lines 0 comments Download
M content/browser/payments/payment_app_manager.cc View 1 2 3 4 3 chunks +7 lines, -122 lines 0 comments Download
M content/browser/payments/payment_app_manager_unittest.cc View 1 2 3 4 5 6 chunks +76 lines, -31 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/browser/storage_partition_impl.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 23 (12 generated)
zino
PTAL
4 years ago (2016-12-14 17:03:50 UTC) #3
Avi (use Gerrit)
lgtm https://codereview.chromium.org/2572183002/diff/1/content/browser/payments/payment_app_context_impl.cc File content/browser/payments/payment_app_context_impl.cc (right): https://codereview.chromium.org/2572183002/diff/1/content/browser/payments/payment_app_context_impl.cc#newcode76 content/browser/payments/payment_app_context_impl.cc:76: base::WrapUnique(new PaymentAppDatabase(service_worker_context)); MakeUnique unless there is some reason ...
4 years ago (2016-12-14 17:10:11 UTC) #4
zino
Avi@, Thank you for review. PTAL rouslan@ for payments https://codereview.chromium.org/2572183002/diff/1/content/browser/payments/payment_app_context_impl.cc File content/browser/payments/payment_app_context_impl.cc (right): https://codereview.chromium.org/2572183002/diff/1/content/browser/payments/payment_app_context_impl.cc#newcode76 content/browser/payments/payment_app_context_impl.cc:76: ...
4 years ago (2016-12-14 17:27:42 UTC) #5
please use gerrit instead
https://codereview.chromium.org/2572183002/diff/60001/content/browser/payments/payment_app_context_impl.cc File content/browser/payments/payment_app_context_impl.cc (right): https://codereview.chromium.org/2572183002/diff/60001/content/browser/payments/payment_app_context_impl.cc#newcode28 content/browser/payments/payment_app_context_impl.cc:28: base::Bind(&PaymentAppContextImpl::CreatePaymentAppDatabaseOnIO, this, Either call this InitOnIO() or rename the ...
4 years ago (2016-12-14 19:44:00 UTC) #6
zino
I addressed all your comments. Could you review again? https://codereview.chromium.org/2572183002/diff/60001/content/browser/payments/payment_app_context_impl.cc File content/browser/payments/payment_app_context_impl.cc (right): https://codereview.chromium.org/2572183002/diff/60001/content/browser/payments/payment_app_context_impl.cc#newcode28 content/browser/payments/payment_app_context_impl.cc:28: ...
4 years ago (2016-12-15 17:56:53 UTC) #7
please use gerrit instead
https://codereview.chromium.org/2572183002/diff/80001/content/browser/payments/payment_app_context_impl.cc File content/browser/payments/payment_app_context_impl.cc (right): https://codereview.chromium.org/2572183002/diff/80001/content/browser/payments/payment_app_context_impl.cc#newcode101 content/browser/payments/payment_app_context_impl.cc:101: DCHECK(!payment_app_database_); 1) For the sake of thread-safety, don't access ...
4 years ago (2016-12-15 19:24:31 UTC) #8
zino
Thank you for review. https://codereview.chromium.org/2572183002/diff/60001/content/browser/payments/payment_app_manager_unittest.cc File content/browser/payments/payment_app_manager_unittest.cc (right): https://codereview.chromium.org/2572183002/diff/60001/content/browser/payments/payment_app_manager_unittest.cc#newcode86 content/browser/payments/payment_app_manager_unittest.cc:86: EXPECT_TRUE(manager_); On 2016/12/14 19:44:00, rouslan ...
4 years ago (2016-12-15 23:33:57 UTC) #9
please use gerrit instead
lgtm https://codereview.chromium.org/2572183002/diff/80001/content/browser/payments/payment_app_manager.cc File content/browser/payments/payment_app_manager.cc (right): https://codereview.chromium.org/2572183002/diff/80001/content/browser/payments/payment_app_manager.cc#newcode13 content/browser/payments/payment_app_manager.cc:13: #include "content/browser/payments/payment_app_database.h" On 2016/12/15 23:33:56, zino wrote: > ...
4 years ago (2016-12-16 14:25:56 UTC) #15
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/2572183002/100001
4 years ago (2016-12-16 14:30:27 UTC) #18
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-12-16 14:34:35 UTC) #21
commit-bot: I haz the power
4 years ago (2016-12-16 14:36:41 UTC) #23
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/ab43057199ce68c2e9264fa98c9bd24cc1be4fd8
Cr-Commit-Position: refs/heads/master@{#439100}

Powered by Google App Engine
This is Rietveld 408576698