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

Side by Side Diff: components/autofill/browser/wallet/cart.h

Issue 13928035: WIP Component build of autofill Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make windows compiling Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_AUTOFILL_BROWSER_WALLET_CART_H_ 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_WALLET_CART_H_
6 #define COMPONENTS_AUTOFILL_BROWSER_WALLET_CART_H_ 6 #define COMPONENTS_AUTOFILL_BROWSER_WALLET_CART_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "components/autofill/common/autofill_export.h"
12 13
13 namespace base { 14 namespace base {
14 class DictionaryValue; 15 class DictionaryValue;
15 } 16 }
16 17
17 namespace autofill { 18 namespace autofill {
18 namespace wallet { 19 namespace wallet {
19 20
20 // Container object for purchase data provided by the browser. The enclosed data 21 // Container object for purchase data provided by the browser. The enclosed data
21 // is required to request a FullWallet from Online Wallet in order to set 22 // is required to request a FullWallet from Online Wallet in order to set
22 // spending limits on the generated proxy card. If the actual amount is not 23 // spending limits on the generated proxy card. If the actual amount is not
23 // available, the maximum allowable value should be used: $1850 USD. Online 24 // available, the maximum allowable value should be used: $1850 USD. Online
24 // Wallet is designed to accept price information in addition to information 25 // Wallet is designed to accept price information in addition to information
25 // about the items being purchased hence the name Cart. 26 // about the items being purchased hence the name Cart.
26 class Cart { 27 class AUTOFILL_EXPORT Cart {
27 public: 28 public:
28 Cart(const std::string& total_price, const std::string& currency_code); 29 Cart(const std::string& total_price, const std::string& currency_code);
29 ~Cart(); 30 ~Cart();
30 31
31 scoped_ptr<base::DictionaryValue> ToDictionary() const; 32 scoped_ptr<base::DictionaryValue> ToDictionary() const;
32 33
33 const std::string& total_price() const { return total_price_; } 34 const std::string& total_price() const { return total_price_; }
34 const std::string& currency_code() const { return currency_code_; } 35 const std::string& currency_code() const { return currency_code_; }
35 36
36 private: 37 private:
37 // |total_price_| must be a formatted as a double with no more than two 38 // |total_price_| must be a formatted as a double with no more than two
38 // decimals, e.g. 100.99 39 // decimals, e.g. 100.99
39 std::string total_price_; 40 std::string total_price_;
40 41
41 // |currency_code_| must be one of the ISO 4217 currency codes, e.g. USD. 42 // |currency_code_| must be one of the ISO 4217 currency codes, e.g. USD.
42 std::string currency_code_; 43 std::string currency_code_;
43 44
44 DISALLOW_ASSIGN(Cart); 45 DISALLOW_ASSIGN(Cart);
45 }; 46 };
46 47
47 } // namespace wallet 48 } // namespace wallet
48 } // namespace autofill 49 } // namespace autofill
49 50
50 #endif // COMPONENTS_AUTOFILL_BROWSER_WALLET_CART_H_ 51 #endif // COMPONENTS_AUTOFILL_BROWSER_WALLET_CART_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698