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

Side by Side Diff: components/payments/core/payment_method_data.h

Issue 2797833002: [Payments] base::string16 -> std::string in PaymentMethodData (Closed)
Patch Set: addressed comments Created 3 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
« no previous file with comments | « no previous file | components/payments/core/payment_method_data.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_PAYMENTS_CORE_PAYMENT_METHOD_DATA_H_ 5 #ifndef COMPONENTS_PAYMENTS_CORE_PAYMENT_METHOD_DATA_H_
6 #define COMPONENTS_PAYMENTS_CORE_PAYMENT_METHOD_DATA_H_ 6 #define COMPONENTS_PAYMENTS_CORE_PAYMENT_METHOD_DATA_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/strings/string16.h"
12
13 namespace base { 12 namespace base {
14 class DictionaryValue; 13 class DictionaryValue;
15 } 14 }
16 15
17 namespace payments { 16 namespace payments {
18 17
19 // A set of supported payment methods and any associated payment method specific 18 // A set of supported payment methods and any associated payment method specific
20 // data for those methods. 19 // data for those methods.
21 class PaymentMethodData { 20 class PaymentMethodData {
22 public: 21 public:
23 PaymentMethodData(); 22 PaymentMethodData();
24 PaymentMethodData(const PaymentMethodData& other); 23 PaymentMethodData(const PaymentMethodData& other);
25 ~PaymentMethodData(); 24 ~PaymentMethodData();
26 25
27 bool operator==(const PaymentMethodData& other) const; 26 bool operator==(const PaymentMethodData& other) const;
28 bool operator!=(const PaymentMethodData& other) const; 27 bool operator!=(const PaymentMethodData& other) const;
29 28
30 // Populates the properties of this PaymentMethodData from |value|. Returns 29 // Populates the properties of this PaymentMethodData from |value|. Returns
31 // true if the required values are present. 30 // true if the required values are present.
32 bool FromDictionaryValue(const base::DictionaryValue& value); 31 bool FromDictionaryValue(const base::DictionaryValue& value);
33 32
34 // Payment method identifiers for payment methods that the merchant web site 33 // Payment method identifiers for payment methods that the merchant web site
35 // accepts. 34 // accepts.
36 std::vector<base::string16> supported_methods; 35 std::vector<std::string> supported_methods;
37 36
38 // A JSON-serialized object that provides optional information that might be 37 // A JSON-serialized object that provides optional information that might be
39 // needed by the supported payment methods. 38 // needed by the supported payment methods.
40 base::string16 data; 39 std::string data;
41 40
42 // When the methods include "basic-card", a list of networks and types that 41 // When the methods include "basic-card", a list of networks and types that
43 // are supported. 42 // are supported.
44 std::vector<base::string16> supported_networks; 43 std::vector<std::string> supported_networks;
45 std::vector<base::string16> supported_types; 44 std::vector<std::string> supported_types;
46 }; 45 };
47 46
48 } // namespace payments 47 } // namespace payments
49 48
50 #endif // COMPONENTS_PAYMENTS_CORE_PAYMENT_METHOD_DATA_H_ 49 #endif // COMPONENTS_PAYMENTS_CORE_PAYMENT_METHOD_DATA_H_
OLDNEW
« no previous file with comments | « no previous file | components/payments/core/payment_method_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698