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

Issue 2836443002: No rate limit for canMakePayment() on localhost and file://. (Closed)

Created:
3 years, 8 months ago by please use gerrit instead
Modified:
3 years, 7 months ago
Reviewers:
palmer, Mathieu, gogerald1
CC:
Aaron Boodman, abarth-chromium, agrieve+watch_chromium.org, asvitkine+watch_chromium.org, blink-reviews, chromium-reviews, darin (slow to review), darin-cc_chromium.org, gogerald+paymentswatch_chromium.org, haraken, jam, mahmadi+paymentswatch_chromium.org, qsr+mojo_chromium.org, rouslan+payments_chromium.org, sebsg+paymentswatch_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

No rate limit for canMakePayment() on localhost and file://. Before this patch, when web developers are working on localhost or in file:// scheme origins and calling PaymentRequest.canMakePayment() with different payment methods, they would quickly hit a rate limit, even though they are querying their own payment methods. The fix is to warn the web developers on localhost and file:// scheme origins that the quota has been reached, but to not enforce it. This warning is printed to the developer console: "Quota reached for PaymentRequest.canMakePayment(). This would normally reject the promise, but allowing continued usage on localhost and file:// scheme origins." The integration tests call PaymentRequestImpl.setIsLocalCanMakePaymentQueryQuotaEnforcedForTest() to mimic the production behavior. After this patch, the web developers have the freedom to tinker with their own computer and are aware that excessive querying in production website will be rejected. (Note this patch also cleans up the no longer used feature flag "AndroidPaymentAppsFilter".) BUG=713217 Review-Url: https://codereview.chromium.org/2836443002 Cr-Commit-Position: refs/heads/master@{#466734} Committed: https://chromium.googlesource.com/chromium/src/+/deb6be8f732a157329490e49fbfd41826757a0fd

Patch Set 1 #

Patch Set 2 : Clarify comment. #

Total comments: 6

Patch Set 3 : Chris's comments #

Total comments: 8

Patch Set 4 : Comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -71 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/payments/AndroidPaymentAppFactory.java View 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/payments/AndroidPaymentAppFinder.java View 4 chunks +6 lines, -29 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java View 1 2 3 6 chunks +50 lines, -5 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBasicCardTest.java View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcCanMakePaymentQueryTest.java View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppCanMakePaymentQueryTest.java View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/payments/AndroidPaymentAppFinderTest.java View 1 2 6 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/android/chrome_feature_list.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/android/chrome_feature_list.cc View 1 2 3 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/flag_descriptions.h View 1 2 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/flag_descriptions.cc View 1 2 1 chunk +0 lines, -6 lines 0 comments Download
M components/payments/content/android/java/src/org/chromium/components/payments/OriginSecurityChecker.java View 2 chunks +14 lines, -2 lines 0 comments Download
M components/payments/content/android/origin_security_checker_android.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M components/payments/content/origin_security_checker.h View 1 chunk +3 lines, -0 lines 0 comments Download
M components/payments/content/origin_security_checker.cc View 2 chunks +7 lines, -0 lines 0 comments Download
M components/payments/mojom/payment_request.mojom View 1 chunk +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequest.cpp View 2 chunks +15 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (16 generated)
please use gerrit instead
Patch 2: Chris, ptal origin_security_checker.cc. Ganggui, ptal removal of the APP_FILTER flag. Mathieu, ptal EVERYTHING!
3 years, 8 months ago (2017-04-20 20:48:43 UTC) #4
palmer
https://codereview.chromium.org/2836443002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java File chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java (right): https://codereview.chromium.org/2836443002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java#newcode1330 chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java:1330: } else if (shouldCanMakePaymentQueryQuotaBeEnforced() Nit: The name |shouldCanMakePaymentQueryQuotaBeEnforced| is ...
3 years, 8 months ago (2017-04-20 21:37:40 UTC) #8
please use gerrit instead
Chris, ptal patch 3. https://codereview.chromium.org/2836443002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java File chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java (right): https://codereview.chromium.org/2836443002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java#newcode1330 chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java:1330: } else if (shouldCanMakePaymentQueryQuotaBeEnforced() On ...
3 years, 8 months ago (2017-04-21 17:57:47 UTC) #12
palmer
lgtm
3 years, 8 months ago (2017-04-21 18:13:24 UTC) #14
gogerald1
removal of the APP_FILTER flag lgtm
3 years, 8 months ago (2017-04-21 21:29:43 UTC) #17
Mathieu
lgtm with comments https://codereview.chromium.org/2836443002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java File chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java (right): https://codereview.chromium.org/2836443002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java#newcode1320 chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java:1320: if (query == null) { This ...
3 years, 8 months ago (2017-04-23 08:33:30 UTC) #18
please use gerrit instead
Sending to CQ. https://codereview.chromium.org/2836443002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java File chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java (right): https://codereview.chromium.org/2836443002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java#newcode1320 chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java:1320: if (query == null) { On ...
3 years, 7 months ago (2017-04-24 18:40:13 UTC) #19
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/2836443002/60001
3 years, 7 months ago (2017-04-24 18:41:25 UTC) #22
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/deb6be8f732a157329490e49fbfd41826757a0fd
3 years, 7 months ago (2017-04-24 20:22:21 UTC) #25
findit-for-me
3 years, 7 months ago (2017-04-25 06:02:51 UTC) #26
Message was sent while issue was closed.
Findit(https://goo.gl/kROfz5) identified this CL at revision 466734 as the
culprit for
failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3Itb...

Powered by Google App Engine
This is Rietveld 408576698