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

Unified Diff: components/autofill/content/browser/wallet/wallet_service_url.cc

Issue 17970003: New encryption/escrow endpoints for Wallet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing again... Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/content/browser/wallet/wallet_service_url.cc
diff --git a/components/autofill/content/browser/wallet/wallet_service_url.cc b/components/autofill/content/browser/wallet/wallet_service_url.cc
index a0c4e080f9269b131c40a81aee6a003844eb92fa..bebdf7fe0d7b47577aa32062fe7e24480edeec94 100644
--- a/components/autofill/content/browser/wallet/wallet_service_url.cc
+++ b/components/autofill/content/browser/wallet/wallet_service_url.cc
@@ -63,6 +63,15 @@ GURL GetBaseSecureUrl() {
return GURL(kSandboxWalletSecureServiceUrl);
}
+GURL GetBaseEncryptedFrontendUrl() {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ // TODO(ahutter): Stop checking these switches once we switch over to prod.
+ GURL base_url = IsWalletProductionEnabled() ||
+ command_line.HasSwitch(switches::kWalletServiceUrl) ?
+ GetWalletHostUrl() : GetBaseSecureUrl();
+ return base_url.Resolve("online-secure/v2/autocheckout/v1/");
+}
+
} // namespace
namespace wallet {
@@ -72,7 +81,7 @@ GURL GetGetWalletItemsUrl() {
}
GURL GetGetFullWalletUrl() {
- return GetBaseAutocheckoutUrl().Resolve("getFullWalletJwtless");
+ return GetBaseEncryptedFrontendUrl().Resolve("getFullWalletJwtless?s7e=otp");
}
GURL GetManageInstrumentsUrl() {
@@ -88,43 +97,25 @@ GURL GetAcceptLegalDocumentsUrl() {
}
GURL GetAuthenticateInstrumentUrl() {
- return GetBaseAutocheckoutUrl().Resolve("authenticateInstrument");
+ return GetBaseEncryptedFrontendUrl()
+ .Resolve("authenticateInstrument?s7e=cvn");
}
GURL GetSendStatusUrl() {
return GetBaseAutocheckoutUrl().Resolve("reportStatus");
}
-GURL GetSaveToWalletUrl() {
+GURL GetSaveToWalletNoEscrowUrl() {
return GetBaseAutocheckoutUrl().Resolve("saveToWallet");
}
-GURL GetPassiveAuthUrl() {
- return GetBaseWalletUrl().Resolve("passiveauth?isChromePayments=true");
-}
-
-GURL GetEncryptionUrl() {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- // TODO(ahutter): Stop checking these switches once we switch over to prod.
- if (IsWalletProductionEnabled() ||
- command_line.HasSwitch(switches::kWalletServiceUrl)) {
- return GetWalletHostUrl().Resolve(
- "online-secure/temporarydata/cvv?s7e=cvv");
- } else {
- return GetBaseSecureUrl().Resolve(
- "online-secure/temporarydata/cvv?s7e=cvv");
- }
+GURL GetSaveToWalletUrl() {
+ return GetBaseEncryptedFrontendUrl()
+ .Resolve("saveToWallet?s7e=card_number%3Bcvn");
}
-GURL GetEscrowUrl() {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- // TODO(ahutter): Stop checking these switches once we switch over to prod.
- if (IsWalletProductionEnabled() ||
- command_line.HasSwitch(switches::kWalletServiceUrl)) {
- return GetBaseSecureUrl().Resolve("dehEfe?s7e=cardNumber%3Bcvv");
- } else {
- return GetBaseSecureUrl().Resolve("checkout/dehEfe?s7e=cardNumber%3Bcvv");
- }
+GURL GetPassiveAuthUrl() {
+ return GetBaseWalletUrl().Resolve("passiveauth?isChromePayments=true");
}
GURL GetSignInUrl() {

Powered by Google App Engine
This is Rietveld 408576698