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

Issue 2873683002: PaymentHandler: Implement GetAllPaymentApps(). (Closed)

Created:
3 years, 7 months ago by zino
Modified:
3 years, 7 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, kinuko+watch, jsbell+serviceworker_chromium.org, tzik, jam, abarth-chromium, darin-cc_chromium.org, gogerald+paymentswatch_chromium.org, blink-worker-reviews_chromium.org, rouslan+payments_chromium.org, michaeln, shimazu+serviceworker_chromium.org, serviceworker-reviews, Aaron Boodman, kinuko+serviceworker, mahmadi+paymentswatch_chromium.org, horo+watch_chromium.org, darin (slow to review), sebsg+paymentswatch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

PaymentHandler: Implement GetAllPaymentApps(). The method is used to query all stored payment app data in Chrome layer. In the PaymentRequest UI, we can display all possible payment instruments associated service worker. This change will replace the legacy GetAllManifests() with new thing. Also, this change exposes a new contnt public struct(StorePaymentInstrument) to pass the stored payment instrument data to Chrome layer. The second CL of the following links contains this usage of the public API. See the other CLs in this series: [1/2] http://crrev.com/2873683002 (This patch) [2/2] http://crrev.com/2867273003 (Use GetAllPaymentApps() in android) Design Doc: https://docs.google.com/document/d/1rWsvKQAwIboN2ZDuYYAkfce8GF27twi4UHTt0hcbyxQ/edit?usp=sharing BUG=661608 Review-Url: https://codereview.chromium.org/2873683002 Cr-Commit-Position: refs/heads/master@{#471579} Committed: https://chromium.googlesource.com/chromium/src/+/5f5a9b49ed920d6c4ca3760531a9f8fa842db2dc

Patch Set 1 #

Patch Set 2 : PaymentHandler: Implement GetAllPaymentApps(). #

Total comments: 24

Patch Set 3 : PaymentHandler: Implement GetAllPaymentApps(). #

Patch Set 4 : PaymentHandler: Implement GetAllPaymentApps(). #

Patch Set 5 : rebased #

Patch Set 6 : PaymentHandler: Implement GetAllPaymentApps(). #

Total comments: 5

Patch Set 7 : PaymentHandler: Implement GetAllPaymentApps(). #

Total comments: 4

Patch Set 8 : PaymentHandler: Implement GetAllPaymentApps(). #

Patch Set 9 : rebased #

Total comments: 5

Patch Set 10 : PaymentHandler: Implement GetAllPaymentApps(). #

Total comments: 2

Patch Set 11 : PaymentHandler: Implement GetAllPaymentApps(). #

Patch Set 12 : addressed nit #

Patch Set 13 : installed -> stored in public #

Unified diffs Side-by-side diffs Delta from patch set Stats (+468 lines, -13 lines) Patch
M content/browser/payments/payment_app.proto View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -5 lines 0 comments Download
M content/browser/payments/payment_app_database.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +16 lines, -0 lines 0 comments Download
M content/browser/payments/payment_app_database.cc View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +65 lines, -8 lines 0 comments Download
M content/browser/payments/payment_app_provider_impl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/payments/payment_app_provider_impl.cc View 2 chunks +33 lines, -0 lines 0 comments Download
M content/browser/payments/payment_app_provider_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +54 lines, -0 lines 0 comments Download
M content/browser/payments/payment_manager.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_database.h View 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_database.cc View 1 2 3 4 5 6 7 1 chunk +65 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_database_unittest.cc View 1 2 3 4 5 6 7 1 chunk +78 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.h View 2 chunks +10 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 2 chunks +46 lines, -0 lines 0 comments Download
M content/public/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/browser/payment_app_provider.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +11 lines, -0 lines 0 comments Download
A content/public/browser/stored_payment_instrument.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +42 lines, -0 lines 0 comments Download
A content/public/browser/stored_payment_instrument.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 42 (13 generated)
zino
PTAL rouslan@ for payments Tom Sepez@ for mojom nhiroki@ for service worker nasko@ for content/public ...
3 years, 7 months ago (2017-05-09 16:54:51 UTC) #5
Tom Sepez
https://codereview.chromium.org/2873683002/diff/20001/components/payments/mojom/payment_app.mojom File components/payments/mojom/payment_app.mojom (right): https://codereview.chromium.org/2873683002/diff/20001/components/payments/mojom/payment_app.mojom#newcode40 components/payments/mojom/payment_app.mojom:40: int64 registration_id; Where does this ID come from? Is ...
3 years, 7 months ago (2017-05-09 17:07:21 UTC) #6
zino
Thank you for review. https://codereview.chromium.org/2873683002/diff/20001/components/payments/mojom/payment_app.mojom File components/payments/mojom/payment_app.mojom (right): https://codereview.chromium.org/2873683002/diff/20001/components/payments/mojom/payment_app.mojom#newcode40 components/payments/mojom/payment_app.mojom:40: int64 registration_id; On 2017/05/09 17:07:21, ...
3 years, 7 months ago (2017-05-09 17:16:57 UTC) #7
Tom Sepez
https://codereview.chromium.org/2873683002/diff/20001/components/payments/mojom/payment_app.mojom File components/payments/mojom/payment_app.mojom (right): https://codereview.chromium.org/2873683002/diff/20001/components/payments/mojom/payment_app.mojom#newcode40 components/payments/mojom/payment_app.mojom:40: int64 registration_id; I'm not sure the comment is helpful. ...
3 years, 7 months ago (2017-05-09 17:37:25 UTC) #8
please use gerrit instead
https://codereview.chromium.org/2873683002/diff/20001/content/browser/payments/payment_app_provider_impl_unittest.cc File content/browser/payments/payment_app_provider_impl_unittest.cc (right): https://codereview.chromium.org/2873683002/diff/20001/content/browser/payments/payment_app_provider_impl_unittest.cc#newcode18 content/browser/payments/payment_app_provider_impl_unittest.cc:18: using payments::mojom::PaymentAppManifestPtr; Please move these using statements below, so ...
3 years, 7 months ago (2017-05-09 18:01:47 UTC) #9
nasko
I'll stamp content/public once all other reviewers are happy. https://codereview.chromium.org/2873683002/diff/20001/content/browser/payments/payment_app_provider_impl.cc File content/browser/payments/payment_app_provider_impl.cc (right): https://codereview.chromium.org/2873683002/diff/20001/content/browser/payments/payment_app_provider_impl.cc#newcode189 content/browser/payments/payment_app_provider_impl.cc:189: ...
3 years, 7 months ago (2017-05-09 22:46:44 UTC) #10
nhiroki
Looks good. Added some comments. https://codereview.chromium.org/2873683002/diff/20001/content/browser/service_worker/service_worker_database.cc File content/browser/service_worker/service_worker_database.cc (right): https://codereview.chromium.org/2873683002/diff/20001/content/browser/service_worker/service_worker_database.cc#newcode1033 content/browser/service_worker/service_worker_database.cc:1033: ServiceWorkerDatabase::ReadUserDataForAllRegistrationsByKeyPrefix( Can you add ...
3 years, 7 months ago (2017-05-09 23:49:15 UTC) #11
zino
Thank you for review, rouslan@, nhiroki@, nasko@, I addressed your comments or left reply. https://codereview.chromium.org/2873683002/diff/20001/content/browser/payments/payment_app_provider_impl.cc ...
3 years, 7 months ago (2017-05-10 15:57:43 UTC) #12
zino
Tom Sepez@, Thank you for review. PTAL. https://codereview.chromium.org/2873683002/diff/20001/components/payments/mojom/payment_app.mojom File components/payments/mojom/payment_app.mojom (right): https://codereview.chromium.org/2873683002/diff/20001/components/payments/mojom/payment_app.mojom#newcode40 components/payments/mojom/payment_app.mojom:40: int64 registration_id; ...
3 years, 7 months ago (2017-05-10 17:54:42 UTC) #13
Tom Sepez
On 2017/05/10 17:54:42, zino wrote: > Tom Sepez@, > > Thank you for review. PTAL. ...
3 years, 7 months ago (2017-05-10 18:13:20 UTC) #14
please use gerrit instead
https://codereview.chromium.org/2873683002/diff/20001/content/browser/service_worker/service_worker_database.cc File content/browser/service_worker/service_worker_database.cc (right): https://codereview.chromium.org/2873683002/diff/20001/content/browser/service_worker/service_worker_database.cc#newcode1034 content/browser/service_worker/service_worker_database.cc:1034: const std::string& user_data_name_prefix, On 2017/05/10 15:57:43, zino wrote: > ...
3 years, 7 months ago (2017-05-10 18:14:36 UTC) #16
zino
https://codereview.chromium.org/2873683002/diff/20001/content/browser/service_worker/service_worker_database.cc File content/browser/service_worker/service_worker_database.cc (right): https://codereview.chromium.org/2873683002/diff/20001/content/browser/service_worker/service_worker_database.cc#newcode1034 content/browser/service_worker/service_worker_database.cc:1034: const std::string& user_data_name_prefix, On 2017/05/10 18:14:35, ಠ_ಠ wrote: > ...
3 years, 7 months ago (2017-05-10 18:36:32 UTC) #18
rouslan
On 2017/05/10 18:36:32, zino wrote: > I don't disagree but I didn't find any past ...
3 years, 7 months ago (2017-05-10 18:38:45 UTC) #19
rouslan
Example: https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/payments/AndroidPaymentApp.java?rcl=45f9edaab18c6ef3006ac811f8e839eae777c340&l=50
3 years, 7 months ago (2017-05-10 18:38:55 UTC) #20
zino
rouslan@ PTAL https://codereview.chromium.org/2873683002/diff/100001/content/public/browser/payment_app_provider.h File content/public/browser/payment_app_provider.h (right): https://codereview.chromium.org/2873683002/diff/100001/content/public/browser/payment_app_provider.h#newcode28 content/public/browser/payment_app_provider.h:28: // https://docs.google.com/document/d/1rWsvKQAwIboN2ZDuYYAkfce8GF27twi4UHTt0hcbyxQ/edit?usp=sharing Done
3 years, 7 months ago (2017-05-10 19:34:12 UTC) #21
zino
On 2017/05/10 18:38:55, rouslan wrote: > Example: > > https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/payments/AndroidPaymentApp.java?rcl=45f9edaab18c6ef3006ac811f8e839eae777c340&l=50 Thank you for this example.
3 years, 7 months ago (2017-05-10 19:34:28 UTC) #22
please use gerrit instead
LGTM % comments https://codereview.chromium.org/2873683002/diff/100001/content/browser/payments/payment_app_provider_impl_unittest.cc File content/browser/payments/payment_app_provider_impl_unittest.cc (right): https://codereview.chromium.org/2873683002/diff/100001/content/browser/payments/payment_app_provider_impl_unittest.cc#newcode18 content/browser/payments/payment_app_provider_impl_unittest.cc:18: using payments::mojom::PaymentAppManifestPtr; Move down? https://codereview.chromium.org/2873683002/diff/100001/content/public/browser/payment_instrument.cc File ...
3 years, 7 months ago (2017-05-10 19:49:17 UTC) #23
zino
https://codereview.chromium.org/2873683002/diff/100001/content/browser/payments/payment_app_provider_impl_unittest.cc File content/browser/payments/payment_app_provider_impl_unittest.cc (right): https://codereview.chromium.org/2873683002/diff/100001/content/browser/payments/payment_app_provider_impl_unittest.cc#newcode18 content/browser/payments/payment_app_provider_impl_unittest.cc:18: using payments::mojom::PaymentAppManifestPtr; On 2017/05/10 19:49:17, ಠ_ಠ wrote: > Move ...
3 years, 7 months ago (2017-05-11 01:29:57 UTC) #24
nhiroki
On 2017/05/10 15:57:43, zino wrote: > https://codereview.chromium.org/2873683002/diff/20001/content/browser/service_worker/service_worker_database.cc#newcode1034 > content/browser/service_worker/service_worker_database.cc:1034: const > std::string& user_data_name_prefix, > On ...
3 years, 7 months ago (2017-05-11 07:12:12 UTC) #25
nhiroki
LGTM https://codereview.chromium.org/2873683002/diff/120001/content/browser/service_worker/service_worker_database.cc File content/browser/service_worker/service_worker_database.cc (right): https://codereview.chromium.org/2873683002/diff/120001/content/browser/service_worker/service_worker_database.cc#newcode1073 content/browser/service_worker/service_worker_database.cc:1073: DCHECK(parts.size() == 2); Can you remove this check ...
3 years, 7 months ago (2017-05-11 07:12:40 UTC) #26
zino
Thank you for review. nasko@ PTAL https://codereview.chromium.org/2873683002/diff/120001/content/browser/service_worker/service_worker_database.cc File content/browser/service_worker/service_worker_database.cc (right): https://codereview.chromium.org/2873683002/diff/120001/content/browser/service_worker/service_worker_database.cc#newcode1073 content/browser/service_worker/service_worker_database.cc:1073: DCHECK(parts.size() == 2); ...
3 years, 7 months ago (2017-05-11 14:21:05 UTC) #27
nasko
https://codereview.chromium.org/2873683002/diff/20001/content/browser/payments/payment_app_provider_impl.cc File content/browser/payments/payment_app_provider_impl.cc (right): https://codereview.chromium.org/2873683002/diff/20001/content/browser/payments/payment_app_provider_impl.cc#newcode189 content/browser/payments/payment_app_provider_impl.cc:189: BrowserContext::GetDefaultStoragePartition(browser_context)); On 2017/05/10 15:57:42, zino wrote: > On 2017/05/09 ...
3 years, 7 months ago (2017-05-11 21:45:40 UTC) #28
zino
Thank you for review. Could you review a new patch set again? https://codereview.chromium.org/2873683002/diff/20001/content/browser/payments/payment_app_provider_impl.cc File content/browser/payments/payment_app_provider_impl.cc ...
3 years, 7 months ago (2017-05-12 20:59:21 UTC) #29
nasko
LGTM with some nits. https://codereview.chromium.org/2873683002/diff/20001/content/browser/payments/payment_app_provider_impl.cc File content/browser/payments/payment_app_provider_impl.cc (right): https://codereview.chromium.org/2873683002/diff/20001/content/browser/payments/payment_app_provider_impl.cc#newcode189 content/browser/payments/payment_app_provider_impl.cc:189: BrowserContext::GetDefaultStoragePartition(browser_context)); On 2017/05/12 20:59:21, zino ...
3 years, 7 months ago (2017-05-12 21:12:10 UTC) #30
zino
Thank you for review! I updated CL description and addressed nits. https://codereview.chromium.org/2873683002/diff/170001/content/public/browser/installed_payment_instrument.h File content/public/browser/installed_payment_instrument.h (right): ...
3 years, 7 months ago (2017-05-12 21:33:32 UTC) #32
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/2873683002/230001
3 years, 7 months ago (2017-05-12 21:35:33 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/443707)
3 years, 7 months ago (2017-05-13 02:52:53 UTC) #37
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/2873683002/230001
3 years, 7 months ago (2017-05-13 03:48:03 UTC) #39
commit-bot: I haz the power
3 years, 7 months ago (2017-05-13 07:55:28 UTC) #42
Message was sent while issue was closed.
Committed patchset #13 (id:230001) as
https://chromium.googlesource.com/chromium/src/+/5f5a9b49ed920d6c4ca3760531a9...

Powered by Google App Engine
This is Rietveld 408576698