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

Unified Diff: chrome/browser/autofill/wallet/wallet_service_url.cc

Issue 11773037: Implementation of sensitive card information escrowing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing Ilya's final comments Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/wallet/wallet_service_url.cc
diff --git a/chrome/browser/autofill/wallet/wallet_service_url.cc b/chrome/browser/autofill/wallet/wallet_service_url.cc
index 811d9379f3c5257bfcd09a6a6e158af8a65ac56d..9c7869ecf96d8a81a1667c3016cfebb94134cd86 100644
--- a/chrome/browser/autofill/wallet/wallet_service_url.cc
+++ b/chrome/browser/autofill/wallet/wallet_service_url.cc
@@ -12,23 +12,32 @@
namespace {
-const char kDefaultWalletServiceUrl[] = "https://wallet.google.com/online/v2/";
+const char kDefaultWalletServiceUrl[] = "https://wallet.google.com/";
-const char kDefaultWalletSecureServiceUrl[] =
- "https://wallet.google.com/online-secure/temporarydata/cvv?s7e=cvv";
-
-GURL GetBaseWalletUrl() {
+GURL GetWalletHostUrl() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- std::string base_wallet_service_url =
+ std::string wallet_service_hostname =
command_line.GetSwitchValueASCII(switches::kWalletServiceUrl);
- return !base_wallet_service_url.empty() ? GURL(base_wallet_service_url) :
+ return !wallet_service_hostname.empty() ? GURL(wallet_service_hostname) :
GURL(kDefaultWalletServiceUrl);
}
+GURL GetBaseWalletUrl() {
+ return GetWalletHostUrl().Resolve("online/v2/");
+}
+
GURL GetBaseAutocheckoutUrl() {
return GetBaseWalletUrl().Resolve("wallet/autocheckout/");
}
+GURL GetBaseSecureUrl() {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ std::string wallet_secure_url =
+ command_line.GetSwitchValueASCII(switches::kWalletSecureServiceUrl);
+ return !wallet_secure_url.empty() ? GURL(wallet_secure_url) :
+ GURL(kDefaultWalletServiceUrl);
+}
+
} // anonymous namespace
namespace wallet {
@@ -38,8 +47,7 @@ namespace wallet {
const char kApiKey[] = "abcdefg";
GURL GetGetWalletItemsUrl() {
- return GetBaseWalletUrl().Resolve(
- "wallet/autocheckout/getWalletItemsJwtless");
+ return GetBaseAutocheckoutUrl().Resolve("getWalletItemsJwtless");
}
GURL GetGetFullWalletUrl() {
@@ -62,12 +70,12 @@ GURL GetPassiveAuthUrl() {
return GetBaseWalletUrl().Resolve("passiveauth");
}
-GURL GetSecureUrl() {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- std::string wallet_secure_url =
- command_line.GetSwitchValueASCII(switches::kWalletSecureServiceUrl);
- return !wallet_secure_url.empty() ? GURL(wallet_secure_url) :
- GURL(kDefaultWalletSecureServiceUrl);
+GURL GetEncryptionUrl() {
+ return GetWalletHostUrl().Resolve("online-secure/temporarydata/cvv?s7e=cvv");
+}
+
+GURL GetEscrowUrl() {
+ return GetBaseSecureUrl().Resolve("dehEfe?s7e=cardNumber%3Bcvv");
}
} // namespace wallet
« no previous file with comments | « chrome/browser/autofill/wallet/wallet_service_url.h ('k') | chrome/browser/autofill/wallet/wallet_service_url_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698