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

Issue 2880133002: PaymentHandler: Should not allow accessing PaymentManager in Extension.

Created:
3 years, 7 months ago by zino
Modified:
3 years, 7 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, blink-reviews, gogerald+paymentswatch_chromium.org, haraken, rouslan+payments_chromium.org, mahmadi+paymentswatch_chromium.org, chromium-apps-reviews_chromium.org, sebsg+paymentswatch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

PaymentHandler: Should not allow accessing PaymentManager in Extension. The PaymentHandler API is a web standard way to delegate payment processing to third-party web based app via payment request initiated from merchant site. The API based on the service worker is an extension implementation of ServiceWorkerRegistration. On the other hand, we already allow ServiceWorker in Extension side. It means that we also allow this feature. In terms of security, we are not sure what will happen if we enable this feature in Extension side. Therefore, it is correct that we should disable this feature in Extension side. This CL is initiated from https://codereview.chromium.org/2873683002/#msg28. BUG=661608, 721897

Patch Set 1 #

Patch Set 2 : typo #

Total comments: 6

Patch Set 3 : PaymentHandler: Should not allow accessing PaymentManager in Extension. #

Total comments: 1

Patch Set 4 : PaymentHandler: Should not allow accessing PaymentManager in Extension. #

Messages

Total messages: 11 (3 generated)
zino
PTAL rouslan@ for payments lazyboy@ for extensions nasko@, I added you as reviewer in this ...
3 years, 7 months ago (2017-05-14 09:34:37 UTC) #4
please use gerrit instead
https://codereview.chromium.org/2880133002/diff/20001/chrome/test/data/extensions/api_test/service_worker/payments/page.html File chrome/test/data/extensions/api_test/service_worker/payments/page.html (right): https://codereview.chromium.org/2880133002/diff/20001/chrome/test/data/extensions/api_test/service_worker/payments/page.html#newcode1 chrome/test/data/extensions/api_test/service_worker/payments/page.html:1: <script src="page.js"></script> Need a license in <!-- --> comments. ...
3 years, 7 months ago (2017-05-15 14:46:47 UTC) #5
zino
Thank you for review! https://codereview.chromium.org/2880133002/diff/20001/chrome/test/data/extensions/api_test/service_worker/payments/page.html File chrome/test/data/extensions/api_test/service_worker/payments/page.html (right): https://codereview.chromium.org/2880133002/diff/20001/chrome/test/data/extensions/api_test/service_worker/payments/page.html#newcode1 chrome/test/data/extensions/api_test/service_worker/payments/page.html:1: <script src="page.js"></script> On 2017/05/15 14:46:47, ...
3 years, 7 months ago (2017-05-15 18:38:13 UTC) #6
please use gerrit instead
lgtm
3 years, 7 months ago (2017-05-15 18:40:16 UTC) #7
lazyboy
https://codereview.chromium.org/2880133002/diff/40001/chrome/test/data/extensions/api_test/service_worker/payments/page.js File chrome/test/data/extensions/api_test/service_worker/payments/page.js (right): https://codereview.chromium.org/2880133002/diff/40001/chrome/test/data/extensions/api_test/service_worker/payments/page.js#newcode11 chrome/test/data/extensions/api_test/service_worker/payments/page.js:11: }).then(function(paymentManager) { The param is not a paymentManager, but ...
3 years, 7 months ago (2017-05-15 20:38:45 UTC) #8
zino
On 2017/05/15 20:38:45, lazyboy wrote: > https://codereview.chromium.org/2880133002/diff/40001/chrome/test/data/extensions/api_test/service_worker/payments/page.js > File chrome/test/data/extensions/api_test/service_worker/payments/page.js > (right): > > https://codereview.chromium.org/2880133002/diff/40001/chrome/test/data/extensions/api_test/service_worker/payments/page.js#newcode11 ...
3 years, 7 months ago (2017-05-16 13:52:50 UTC) #9
lazyboy
OK, getting back to the issue: We probably shouldn't do this for extension. The original ...
3 years, 7 months ago (2017-05-16 22:28:42 UTC) #10
nasko
3 years, 7 months ago (2017-05-19 17:04:10 UTC) #11
On 2017/05/16 22:28:42, lazyboy wrote:
> OK, getting back to the issue:
> We probably shouldn't do this for extension. The original issue as I
understand
> is that you had concerns around StoragePartition for platform apps, but this
is
> extension. Extension can use service workers and shouldn't have that problem
> with StoragePartition.
> I think you'd need to find a way to disable this for platform apps
exclusively.
> You also have take chrome apps <webview> [1] into account, which can load web
> content (including https) in a separate StoragePartition [2].
> 
> [1] https://developer.chrome.com/apps/tags/webview
> [2] https://developer.chrome.com/apps/tags/webview#partition

In general, I would prefer if we don't restrict where features area available as
a workaround to supporting correct StoragePartition. It makes the code more
complicated than needed and doesn't really accomplish much.

Powered by Google App Engine
This is Rietveld 408576698