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

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: Changes from Dane's review Created 8 years, 1 month 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 std::string GetBaseWalletUrl() {
19 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
20 std::string baseWalletServiceUrl = command_line.GetSwitchValueASCII(
21 switches::kWalletServiceUrl);
22 if (baseWalletServiceUrl.empty())
23 return kDefaultWalletServiceUrl;
24
25 return baseWalletServiceUrl;
26 }
27
28 } // anonymous namespace
29
30 const char wallet::kApiKey[] = "abcdefg";
31
32 // TODO(ahutter): check url endpoints after they are all checked in
33
34 GURL wallet::GetGetWalletItemsUrl() {
35 std::string baseWalletServiceUrl = GetBaseWalletUrl();
36 return GURL(baseWalletServiceUrl + "getWalletItemsJwtless");
37 }
38
39 GURL wallet::GetGetFullWalletUrl() {
40 std::string baseWalletServiceUrl = GetBaseWalletUrl();
41 return GURL(baseWalletServiceUrl + "getFullWalletJwtless");
42 }
43 GURL wallet::GetAcceptLegalDocumentsUrl() {
44 std::string baseWalletServiceUrl = GetBaseWalletUrl();
45 return GURL(baseWalletServiceUrl + "acceptLegalDocuments");
46 }
47
48 GURL wallet::GetSecureUrl() {
49 // TODO(ahutter): find a cleaner way to do this. Two flags?
50 return GURL("http://nogravitas.mtv.corp.google.com:8888/online-secure/"
Raman Kakilate 2012/11/17 04:10:51 get rid of this. and set is a flag similar to serv
ahutter 2012/11/27 00:46:12 Done.
51 "temporarydata/cvv?s7e=cvv");
52 }
53
54 GURL wallet::GetSendStatusUrl() {
55 std::string baseWalletServiceUrl = GetBaseWalletUrl();
56 return GURL(baseWalletServiceUrl + "reportStatus");
57 }
58
59 GURL wallet::GetSaveToWalletUrl() {
60 std::string baseWalletServiceUrl = GetBaseWalletUrl();
61 return GURL(baseWalletServiceUrl + "saveToWallet" );
62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698