|
|
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
Total comments: 6
Total comments: 8
|
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
|
Total messages: 26 (16 generated)
|