| 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
|
| deleted file mode 100644
|
| index 5a32e858d3fcaa8070c630f92856d3f34811b9a6..0000000000000000000000000000000000000000
|
| --- a/chrome/browser/autofill/wallet/wallet_service_url.cc
|
| +++ /dev/null
|
| @@ -1,107 +0,0 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -#include "chrome/browser/autofill/wallet/wallet_service_url.h"
|
| -
|
| -#include <string>
|
| -
|
| -#include "base/command_line.h"
|
| -#include "components/autofill/common/autofill_switches.h"
|
| -#include "google_apis/gaia/gaia_urls.h"
|
| -#include "googleurl/src/gurl.h"
|
| -#include "net/base/url_util.h"
|
| -
|
| -namespace {
|
| -
|
| -const char kDefaultWalletServiceUrl[] = "https://wallet.google.com/";
|
| -
|
| -GURL GetWalletHostUrl() {
|
| - const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
| - std::string wallet_service_hostname =
|
| - command_line.GetSwitchValueASCII(switches::kWalletServiceUrl);
|
| - 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/v1/");
|
| -}
|
| -
|
| -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 autofill {
|
| -namespace wallet {
|
| -
|
| -GURL GetGetWalletItemsUrl() {
|
| - return GetBaseAutocheckoutUrl().Resolve("getWalletItemsJwtless");
|
| -}
|
| -
|
| -GURL GetGetFullWalletUrl() {
|
| - return GetBaseAutocheckoutUrl().Resolve("getFullWalletJwtless");
|
| -}
|
| -
|
| -GURL GetAcceptLegalDocumentsUrl() {
|
| - return GetBaseAutocheckoutUrl().Resolve("acceptLegalDocument");
|
| -}
|
| -
|
| -GURL GetAuthenticateInstrumentUrl() {
|
| - return GetBaseAutocheckoutUrl().Resolve("authenticateInstrument");
|
| -}
|
| -
|
| -GURL GetSendStatusUrl() {
|
| - return GetBaseAutocheckoutUrl().Resolve("reportStatus");
|
| -}
|
| -
|
| -GURL GetSaveToWalletUrl() {
|
| - return GetBaseAutocheckoutUrl().Resolve("saveToWallet");
|
| -}
|
| -
|
| -GURL GetPassiveAuthUrl() {
|
| - return GetBaseWalletUrl().Resolve("passiveauth");
|
| -}
|
| -
|
| -GURL GetEncryptionUrl() {
|
| - return GetWalletHostUrl().Resolve("online-secure/temporarydata/cvv?s7e=cvv");
|
| -}
|
| -
|
| -GURL GetEscrowUrl() {
|
| - return GetBaseSecureUrl().Resolve("dehEfe?s7e=cardNumber%3Bcvv");
|
| -}
|
| -
|
| -GURL GetSignInUrl() {
|
| - GURL url(GaiaUrls::GetInstance()->service_login_url());
|
| - url = net::AppendQueryParameter(url, "service", "sierra");
|
| - url = net::AppendQueryParameter(url, "btmpl", "popup");
|
| - url = net::AppendQueryParameter(url,
|
| - "continue",
|
| - GetSignInContinueUrl().spec());
|
| - return url;
|
| -}
|
| -
|
| -// The continue url portion of the sign-in URL.
|
| -GURL GetSignInContinueUrl() {
|
| - return GetPassiveAuthUrl();
|
| -}
|
| -
|
| -bool IsSignInContinueUrl(const GURL& url) {
|
| - GURL final_url = wallet::GetSignInContinueUrl();
|
| - return url.SchemeIsSecure() &&
|
| - url.host() == final_url.host() &&
|
| - url.path() == final_url.path();
|
| -}
|
| -
|
| -} // namespace wallet
|
| -} // namespace autofill
|
|
|