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

Side by Side Diff: chrome/browser/autofill/wallet/wallet_service_url.cc

Issue 11293078: Integrating Online Wallet into Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed linter issue Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/autofill/wallet/wallet_service_url.h"
6
7 #include <string>
8
9 #include "base/command_line.h"
10 #include "chrome/common/chrome_switches.h"
11 #include "googleurl/src/gurl.h"
12
13 namespace {
14
15 const char kDefaultWalletServiceUrl[] =
16 "https://wallet.google.com/online/v2/wallet/autocheckout/";
17
18 const char kDefaultWalletSecureServiceUrl[] =
19 "https://wallet.google.com/online-secure/temporarydata/cvv?s7e=cvv";
20
21 GURL GetBaseWalletUrl() {
22 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
23 std::string baseWalletServiceUrl = command_line.GetSwitchValueASCII(
Evan Stade 2012/12/07 19:57:44 variable names go_like_this also, break the line
ahutter 2012/12/15 01:06:31 Done.
24 switches::kWalletServiceUrl);
25 return !baseWalletServiceUrl.empty() ? GURL(baseWalletServiceUrl) :
26 GURL(kDefaultWalletServiceUrl);
Evan Stade 2012/12/07 19:57:44 indent this to match the first GURL if possible
ahutter 2012/12/15 01:06:31 Done.
27 }
28
29 } // anonymous namespace
30
31 // TODO(ahutter): This shouldn't live in this class. See
32 // http://crbug.com/164281.
33 const char wallet::kApiKey[] = "abcdefg";
34
35 GURL wallet::GetGetWalletItemsUrl() {
36 return GetBaseWalletUrl().Resolve("getWalletItemsJwtless");
37 }
38
39 GURL wallet::GetGetFullWalletUrl() {
40 return GetBaseWalletUrl().Resolve("getFullWalletJwtless");
41 }
Evan Stade 2012/12/07 19:57:44 \n
ahutter 2012/12/15 01:06:31 Done.
42 GURL wallet::GetAcceptLegalDocumentsUrl() {
43 return GetBaseWalletUrl().Resolve("acceptLegalDocuments");
44 }
45
46 GURL wallet::GetSendStatusUrl() {
47 return GetBaseWalletUrl().Resolve("reportStatus");
48 }
49
50 GURL wallet::GetSaveToWalletUrl() {
51 return GetBaseWalletUrl().Resolve("saveToWallet");
52 }
53
54 GURL wallet::GetSecureUrl() {
55 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
56 std::string walletSecureUrl = command_line.GetSwitchValueASCII(
57 switches::kWalletSecureServiceUrl);
58 return !walletSecureUrl.empty() ? GURL(walletSecureUrl) :
Evan Stade 2012/12/07 19:57:44 looks like a there's an extra space here
ahutter 2012/12/15 01:06:31 Done.
59 GURL(kDefaultWalletSecureServiceUrl);
Evan Stade 2012/12/07 19:57:44 indent this to match the first GURL if possible
ahutter 2012/12/15 01:06:31 Done.
60 }
61
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698