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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java

Issue 2526293003: PaymentApp: Add classes for supporting Web Based Payment Apps (Closed)
Patch Set: Make the service worker unittests work even with the feature flag off Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.payments; 5 package org.chromium.chrome.browser.payments;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.graphics.Bitmap; 8 import android.graphics.Bitmap;
9 import android.os.Handler; 9 import android.os.Handler;
10 import android.support.v4.util.ArrayMap; 10 import android.support.v4.util.ArrayMap;
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 @Override 1072 @Override
1073 public void onInstrumentsReady(PaymentApp app, List<PaymentInstrument> instr uments) { 1073 public void onInstrumentsReady(PaymentApp app, List<PaymentInstrument> instr uments) {
1074 if (mClient == null) return; 1074 if (mClient == null) return;
1075 mPendingApps.remove(app); 1075 mPendingApps.remove(app);
1076 1076
1077 // Place the instruments into either "autofill" or "non-autofill" list t o be displayed when 1077 // Place the instruments into either "autofill" or "non-autofill" list t o be displayed when
1078 // all apps have responded. 1078 // all apps have responded.
1079 if (instruments != null) { 1079 if (instruments != null) {
1080 for (int i = 0; i < instruments.size(); i++) { 1080 for (int i = 0; i < instruments.size(); i++) {
1081 PaymentInstrument instrument = instruments.get(i); 1081 PaymentInstrument instrument = instruments.get(i);
1082 Set<String> instrumentMethodNames = instrument.getInstrumentMeth odNames(); 1082 Set<String> instrumentMethodNames =
1083 new HashSet<>(instrument.getInstrumentMethodNames());
1083 instrumentMethodNames.retainAll(mMethodData.keySet()); 1084 instrumentMethodNames.retainAll(mMethodData.keySet());
1084 if (!instrumentMethodNames.isEmpty()) { 1085 if (!instrumentMethodNames.isEmpty()) {
1085 addPendingInstrument(instrument); 1086 addPendingInstrument(instrument);
1086 } else { 1087 } else {
1087 instrument.dismissInstrument(); 1088 instrument.dismissInstrument();
1088 } 1089 }
1089 } 1090 }
1090 } 1091 }
1091 1092
1092 // Some payment apps still have not responded. Continue waiting for them . 1093 // Some payment apps still have not responded. Continue waiting for them .
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 "PaymentRequest.CheckoutFunnel.Aborted", abortReason, 1338 "PaymentRequest.CheckoutFunnel.Aborted", abortReason,
1338 PaymentRequestMetrics.ABORT_REASON_MAX); 1339 PaymentRequestMetrics.ABORT_REASON_MAX);
1339 1340
1340 if (abortReason == PaymentRequestMetrics.ABORT_REASON_ABORTED_BY_USER) { 1341 if (abortReason == PaymentRequestMetrics.ABORT_REASON_ABORTED_BY_USER) {
1341 mJourneyLogger.recordJourneyStatsHistograms("UserAborted"); 1342 mJourneyLogger.recordJourneyStatsHistograms("UserAborted");
1342 } else { 1343 } else {
1343 mJourneyLogger.recordJourneyStatsHistograms("OtherAborted"); 1344 mJourneyLogger.recordJourneyStatsHistograms("OtherAborted");
1344 } 1345 }
1345 } 1346 }
1346 } 1347 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698