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

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

Issue 2652763007: Send site certificate chain to android payment app (Closed)
Patch Set: Actually call getCertificateChain Created 3 years, 11 months 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.os.Handler; 7 import android.os.Handler;
8 8
9 import org.chromium.content_public.browser.WebContents; 9 import org.chromium.content_public.browser.WebContents;
10 import org.chromium.payments.mojom.PaymentMethodData; 10 import org.chromium.payments.mojom.PaymentMethodData;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 mManifest = manifest; 43 mManifest = manifest;
44 44
45 mMethodNames = new HashSet<>(); 45 mMethodNames = new HashSet<>();
46 for (ServiceWorkerPaymentAppBridge.Option option : manifest.options) { 46 for (ServiceWorkerPaymentAppBridge.Option option : manifest.options) {
47 mMethodNames.addAll(option.enabledMethods); 47 mMethodNames.addAll(option.enabledMethods);
48 } 48 }
49 } 49 }
50 50
51 @Override 51 @Override
52 public void getInstruments(Map<String, PaymentMethodData> unusedMethodDataMa p, 52 public void getInstruments(Map<String, PaymentMethodData> unusedMethodDataMa p,
53 String unusedOrigin, final InstrumentsCallback callback) { 53 String unusedOrigin, byte[][] unusedCertificateChain,
54 final InstrumentsCallback callback) {
54 final List<PaymentInstrument> instruments = 55 final List<PaymentInstrument> instruments =
55 new ArrayList<PaymentInstrument>(); 56 new ArrayList<PaymentInstrument>();
56 57
57 for (ServiceWorkerPaymentAppBridge.Option option : mManifest.options) { 58 for (ServiceWorkerPaymentAppBridge.Option option : mManifest.options) {
58 instruments.add(new ServiceWorkerPaymentInstrument( 59 instruments.add(new ServiceWorkerPaymentInstrument(
59 mWebContents, mManifest.registrationId, option)); 60 mWebContents, mManifest.registrationId, option));
60 } 61 }
61 62
62 new Handler().post(new Runnable() { 63 new Handler().post(new Runnable() {
63 @Override 64 @Override
(...skipping 12 matching lines...) Expand all
76 public boolean supportsMethodsAndData(Map<String, PaymentMethodData> methods AndData) { 77 public boolean supportsMethodsAndData(Map<String, PaymentMethodData> methods AndData) {
77 // TODO(tommyt): crbug.com/669876. Implement this for Service Worker Pay ment Apps. 78 // TODO(tommyt): crbug.com/669876. Implement this for Service Worker Pay ment Apps.
78 return true; 79 return true;
79 } 80 }
80 81
81 @Override 82 @Override
82 public String getAppIdentifier() { 83 public String getAppIdentifier() {
83 return "Chrome_Service_Worker_Payment_App"; 84 return "Chrome_Service_Worker_Payment_App";
84 } 85 }
85 } 86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698